After updating Virtualmin to the latest version I get this error when I add a new server:
Creating MySQL login ..
.. MySQL database failed! : mysql::execute_sql_logged failed : SQL alter user 'test03'@'localhost' identified by 'rEyuGCI9T1QPGpI' failed : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'user 'test03'@'localhost' identified by 'rEyuGCI9T1QPGpI'' at line 1 at ../web-lib-funcs.pl line 1496.
When I read older posts in the forum I see that this error exists in an earlier version of Virtualmin, see this topic: Error Enabling MySQL Database.
The problem is in the file /usr/share/webmin/virtual-server/feature-mysql.pl. When I replace this file with the version from Virtualmin 6.08 there is no problem.
My system:
Operating system Ubuntu Linux 18.04.4
Perl version 5.026001
MySQL version 10.1.44-MariaDB-0ubuntu0.18.04.1
Webmin version 1.942
Virtualmin version 6.09
Please look into it because I can’t add servers now to Virtualmin.
I just tried it but this is also not working I get the same error. The strange thing is that it is working in Virtualmin 6.08. When I put back the feature-mysql.pl from that version it is working. So something is changed in the latest version.
Just ran into the same problem myself this morning: we’re using MariaDB hosted on AWS RDS so it’s a remote SQL server. When I restored a server backup this morning I got the same error here and couldn’t restore the DB. The release notes for 6.09 didn’t mention anything about this but I’m assuming it’s a regression to the old issue?
My workaround was to downgrade back to Virtualmin 6.08 for now and restore the backup from there & that worked.
sudo apt-get install webmin-virtual-server=6.08.gpl
I’m afraid I also tried stom’s fix first but it had no impact.
“Glad” that I am not the only one facing this issue. Going back to 6.08 or overwriting the file with the version from 6.08 is a temperaly solutions, but it would be great if one of the devs here can look into it and fix it.
Hopefully it will get somebody’s attention.