Archive for the ‘MySQL’ Category.

Mysql OLD_PASSWORD authentication fix

If you are using a older version of php connecting to a recent mysql (like os X Server 10.4 has) you will probably need to use the OLD_PASSWORD function in your SQL when creating the user or setting the password.

Normally you might do something like this to set a users password:

mysql> SET PASSWORD FOR root@localhost = PASSWORD('mypassword');

Whereas if you see this message from php:

"Client does not support authentication protocol requested by server; consider upgrading MySQL client"

You will almost certainly need to use the OLD_PASSWORD function to encrypt the password, like this:
mysql>

SET PASSWORD FOR root@localhost = OLD_PASSWORD('mypassword');

This is documented more in the MySQL Reference Manual.