Fixing the "Old Insecure Authentication" MySQL Password Error
Modern versions of PHP and MySQL require the newer, more secure password hashing format. If your MySQL user still uses the older pre-4.1 password hash, you may see this error:
Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication...
This usually happens when a database user was created many years ago or imported from an older hosting platform. Both Plesk (Windows 2022) and cPanel (Linux) require updated password hashes.
How to Fix the Error
Log in to phpMyAdmin (via Plesk or cPanel) using the same MySQL username and password shown in your application. Once logged in:
- Select your database.
- Click the SQL tab.
- Run the following SQL commands, replacing the red text with your real password:
SET SESSION old_passwords=0;
SET PASSWORD = PASSWORD('your-existing-password-in-plain-text');
This forces MySQL to convert your password to the current secure hashing format required by modern PHP and MySQL authentication.
Important Notes
- This fix applies to MySQL 5.7 and MySQL 8.x.
- If phpMyAdmin will not let you log in, reset the database user's password from Plesk or cPanel instead.
- If your application uses obsolete
mysql_*PHP functions, upgrade it tomysqliorPDO.
Powerful Windows Plesk Hosting with MySQL Support
Fast, secure Windows Server 2022 hosting with full MySQL and phpMyAdmin support.
View Plesk Hosting →