I am using MySQL version 10.1.37 and trying to enable the MySQL Database feature on a virtual server.
I get this error:
Creating MySQL login …
… MySQL database failed! : mysql::execute_sql_logged failed : SQL alter user ‘username’@‘localhost’ identified by ‘fswCyQ1SSoP48Xe’ 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 ‘username’@‘localhost’ identified by ‘fswCyQ1SSoP48Xe’’ at line 1 at /usr/share/webmin/web-lib-funcs.pl line 1478.
Saving server details …
… done
I initially installed webmin and add the virtualmin module. This is also on a RaspberryPi running Raspbian, but I don’t think is directly related here.
Creating MySQL login ..
.. MySQL database failed! : mysql::execute_sql_logged failed : SQL alter user '****'@'localhost' identified by '**9*' 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 '****'@'localhost' identified by '****'' at line 1 at /usr/share/webmin/web-lib-funcs.pl line 1478.
I have enabled MySQL for other sites on the same machine before, but that was before I updated every package yesterday.
Creating MySQL login …
… MySQL database failed! : mysql::execute_sql_logged failed : SQL alter user ‘apazadito’@‘localhost’ identified by ‘xxxxxxxxxxxxx’ 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 ‘apazadito’@‘localhost’ identified by ‘xxxxxxxxxxxxx’’ at line 1 at /usr/share/webmin/web-lib-funcs.pl line 1478.
I made fresh install of system and virtualmin… (debian 9, 2gb rab) and …
Creating MySQL login …
… MySQL database failed! : mysql::execute_sql_logged failed : SQL alter user ‘gfdn’@‘localhost’ identified by ‘test123’ 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 ‘gfdn’@‘localhost’ identified by ‘test123’’ at line 1 at /usr/share/webmin/web-lib-funcs.pl line 1476.
Same issue here, server made 7 days ago and was able to made new mysql database along with new account.
However after update of server few days ago this error came out
Creating MySQL login …
… MySQL database failed! : mysql::execute_sql_logged failed : SQL insert into user (host, user, ssl_type, ssl_cipher, x509_issuer, x509_subject) values (‘localhost’, ‘test’, ‘’, ‘’, ‘’, ‘’) failed : Field ‘authentication_string’ doesn’t have a default value at …/web-lib-funcs.pl line 1478.
So the problem is in version 6.06 that came out few days ago. As a temporary solution I did yum rollback of that upgrade
=====================================================================================================================================================
Package Arch Version Repository Size
Downgrading:
wbm-virtual-server noarch 2:6.05.gpl-1 virtualmin-universal 2.2 M
Transaction Summary
Downgrade 1 Package
and downgrade to Virtualmin 6.05
Just for the record I use latest Mariadb form mariadb repo
MySQL: MySQL version 10.3.12 (Mariadb from mariadb repo installed before Virtualmin as always I’m doing in last 2 years, first install latest mariadb from repo https://downloads.mariadb.org/mariadb/repositories/ and then install Virtualmin that recognize MySQL was already installed)