php5.3 and mysqlnd old authentication issue

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');
Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

7 Responses to “php5.3 and mysqlnd old authentication issue”

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>