Restore: use mysql_old_password if old password format is used

Version 1.59.2


Sometimes, very old accounts still use the pre-mysql-4.1 16-byte password format. Using the newer methods, if DA tries to reset the raw 16-byte old hash while specifying mysql_native_password (eg: MariaDB 10.2), it will throw an error: Error altering user 'user_dbname': Operation ALTER USER failed for 'user_dbname'@'localhost' without much other information, but if you hunt in the "backup/user_dbname.conf" backup file, and check the "passwd" entries, if you see they're the short 16-byte password without the * character in front, then those are the old_format passwords. -------- The fix is for DA to scan the password being restored. If it does not start with * and is 16 bytes, then DA will instead use: mysql_old_password instead of the mysql_native_password plugin, when altering or duplicating hosts for accounts with a raw hash. The mainly only applies for restores, and when adding extra access hosts to a DB. Should an old password be found, a warning will be included in the restore output, even if everything went ok. This is because these passwords should really be reset to the mysql_native_password format (41-byte hash values starting with *) ---- T20423

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