Add MySQL Database feature fail on Virtual Server setting

Creating MySQL login .. .. MySQL database failed! : SQL insert into user (host, user, ssl_type, ssl_cipher, x509_issuer, x509_subject) values ('localhost', 'admin_finefoodhk', '', '', '', '') failed : Field 'authentication_string' doesn't have a default value at /usr/libexec/webmin/ line 1433.

The Virtualmin Pro seems not able to handling the MySQL database management properly.



Howdy -- thanks for contacting us!

What MySQL version is it that you're using there?

You can determine that with this command:

mysql -V

Also, is MySQL running on the same system as Virtualmin, or a remote server?

Hi andreychek,

mysql -V result is

mysql Ver 14.14 Distrib 5.6.36, for Linux (x86_64) using EditLine wrapper


One last question from Jamie -- is MySQL running on the server itself, or is it on a remote server?

Yes, the MySQL DB Server are also running on the same server.

Any information for investigation are also needs?

Anything I can try to solve it?

If you go to Webmin -> Servers -> MySQL Database, what version number does it show at the top of the page?

The MySQL Database version number show at the top of that page is MySQL version 5.6.36

Is it possible to provide root access for support team to figure out the root cause of my issue?

How did you install this MySQL version exactly? Is it the package that came with your Linux distribution, or did you upgrade manually?

I have installed the MySQL by Yum on my CentOS 7 distribution.

Ok, I think we'd need remote root access to debug this further.

How can I let you login?

Ok, it looks like you are running a MySQL package that comes from a third-party source, not your linux distribution - that explains the problem. I have applied a work-around to your system to address though ... let me know if it helps.

Thank you very much. Is it possible to occur problem in future update?

It shouldn't. Did my patch fix your system though?

The patch you have applied can fix my system. But what should I do whil I need to update my Linux or Virtualmin?

The patch will be included in future releases.

I have found a new issue. The new created virtual server are able to create the default database, and I can able to import tables into the new created database. But the auto-created database user/password doesn't work. I have made a simple db connection test php file, it returns error 500.

Hmm, when you receive that 500 error, what error are you seeing in the error log for the domain?

You can see that log in $HOME/logs/error_log.


I have fixed this issue by myself. The MySQL notify me to run and upgrade command to fix all table structures. Everything back to normal finally.

Hi everybody

On my old server everything worked fine but when i switched to a fresh installation i got this error... so i compared the two installations and noticed that i removed STRICT_TRANS_TABLES from sql_mode in /etc/my.cnf on my old server ;) so i gave it a try on my new server and voilĂ , the error was gone and mysql users were created ;) note: this was for a GPL version of virtualmin but it should work for pro too

Ok, so the issue was likely a mismatch between the MySQL version and it's internal user tables - right now this isn't something Virtualmin is likely to be able to handle automatically.