After upgrading to php5.3, i got this problem:
SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using old authentication
Here is what i found:
* php 5.3 now use a native extension to use mysql : mysqlnd
* my database credential was old (4 years old maybe) and still use the old mysql authentication
* mysqlnd needs the new 41bytes password
The problem was easy to solve:
First, open ‘/etc/my.cnf’ in Linux or ‘my.ini’ in Windows, if you set ‘old_passwords=1’ before, please delete it.
Then, reset the user’s password:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypassword');