I have setup a connection to a remote MySQL server as per instructions on http://www.virtualmin.com/documentation/database/remote
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/web-lib-funcs.pl 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 install.sh
Comments
Submitted by JamieCameron on Tue, 03/20/2012 - 00:54 Comment #1
Are you sure the
bkw1
user has permissions to create other MySQL users by inserting into tables likemysql.user
andmysql.db
? Normally theroot
user has to be used when Virtualmin connects to MySQL, as by default onlyroot
has all the needed permissions ..Submitted by act28 on Tue, 03/20/2012 - 01:04 Comment #2
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.
Submitted by JamieCameron on Tue, 03/20/2012 - 12:28 Comment #3
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
Submitted by act28 on Wed, 03/21/2012 - 17:52 Comment #4
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.
Submitted by JamieCameron on Wed, 03/21/2012 - 18:32 Comment #5
Ok, let us know... however, this does look like a MySQL permissions issue for the
bkw1
user, rather than a Virtualmin bug.Submitted by Davide.Golzi on Wed, 07/22/2020 - 02:30 Comment #6
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?
Submitted by JamieCameron on Sat, 07/25/2020 - 16:01 Comment #7
Davide.Golzi - from that error, it looks like you're logging into MySQL with the wrong username?
Submitted by Davide.Golzi on Mon, 07/27/2020 - 03:31 Comment #8
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