Running an app under PHP 4.3.8 and trying to connect to a MySQL 4.1 database can be pretty frustrating. By default it gives you a message like this:

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

The problem is that by default PHP’s MySQL module is compiled with an older MySQL client library. MySQL has a manual page about this.

I use the OLD_PASSWORD method. I connect to MySQL under root with MySQL Query Browser and I issue the following command:

set password for 'demouser' = old_password('demopass');

Comments from long ago:

Comment from: Rob Rogers

Due to a time crunch I almost revererted to the 4.0*. Instead, now I get to use 4.1, which matches my production environment

2004-11-05 02-11

Comment from: François Planque

Note: When using a newer client library (like the mysql command line tool provided with the 4.1 server), you can connect to older servers and use either the old or the new authentication protocol.

2004-12-02 17-46

Comment from: John Berry

Thank you! This was exactly the advice I needed.

2005-02-09 22-29