Create virtual server fails to create database on remote MySQL server

I have setup a connection to a remote MySQL server as per instructions on

On creating a new virtual server, it fails to create the virtual server user database with the message: Creating MySQL login .. .. MySQL database failed! : DBI connect failed : Access denied for user 'bkw1'@'*******' (using password: YES) at /usr/share/webmin/ line 1360.

However, the user permissions are definitely created in the remote MySQL instance (with default permissions None). Neither the database for the virtual server, nor the database permissions are created.

The bkw1 user definitely has permissions to create a database, from any host, and I can also create the database manually in Webmin using the bkw1 credentials.

In addition, when the virtual server is deleted, the user permissions (and database if created manually) are not deleted from the remote MySQL instance.

VirtualMin 3.90.gpl + Webmin 1.570 were both installed using the GPL



Are you sure the bkw1 user has permissions to create other MySQL users by inserting into tables like mysql.user and mysql.db ? Normally the root user has to be used when Virtualmin connects to MySQL, as by default only root has all the needed permissions ..

Confirmed, I can definitely create new MySQL users in Webmin on the remote MySQL instance. The bkw1 user definitely has perms to create users from the remote.

On the Virtualmin system, can you connect to the mysql database on the remote system with a command like :

mysql -u bkw1 -ppassword -h remote-system mysql

Yep, sure can. I've replicated the setup on another platform and it seems to working correctly. Not sure what has caused it to stuff up. I might reinstall the OS and Virtualmin from scratch and see if that fixes it. Could just be a spurious error.

Ok, let us know... however, this does look like a MySQL permissions issue for the bkw1 user, rather than a Virtualmin bug.

I have the same problem above, I try to use mysql azure instances as mysql database and i recive an error with my administration users. I tested the connection and it works. the errors reported is "SQL delete from user where user = 'xxxx'and host = 'localhost' failed : Access denied for user 'virtualmin'@'%' to database 'mysql'"

i think the admin user hasn't the ability to run sql command against mysql database, but has the ability to run CREATE USER xxxx and DROP USER because i'm able to manage users database throught MySqlWorkbench. Is possible to fix this?

Davide.Golzi - from that error, it looks like you're logging into MySQL with the wrong username?

hi jamie, no I'm quite positive the credential are correct, i'm able to browse the database connected under Webmin->Servers->MySql Server on xxxxx.

I think the problem is virtualmin module for mysql database attempt to create user doing direct query to mysql database