Agus Priyadi and Mafia.Or.ID

blog all about (brains colocations)

Mysql OLD_PASSWORD authentication fix

Posted by mafiaid on 12 February 2008

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:

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:

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

This is documented more in the MySQL Reference Manual.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: