MariaDB: Error inserting host: Field 'authentication_string' doesn't have a default value

Version 1.53


Newer versions of MariaDB don't have a default value for the authentication_string setting in the mysql.user table. This causes an error: Error inserting host: Field 'authentication_string' doesn't have a default value anytime you try to add an access host. The fix checks to see if there is an authentication_string field in mysql.user before duplicating the row for the given user. If there is, then the query also specifies the authentication_string and '' empty default value. Note, the above is *not* for MySQL 5.7 which actually uses the authentication_string column. If you're not running MySQL 5.7, then you must have: mysql_milestone_16=0 or else authentication_string is loaded with the actual password, causing another level of confusion. To clarify: MariaDB must have mysql_milestone_16=0. MySQL 5.7 must have mysql_milestone_16=1 Any other older version of MySQL must have mysql_milestone_16=0. ============== WORKAROUND (old) A temporary work-around is to manually set a default value:

Interested to try DirectAdmin? Get a 30-day Free Trial!