MySQL + PHP: authentication problem

Originally posted on May 15, 2006 on another blog of mine.

If after giving some permission to a database for a user with the command like

grant insert,delete,update,select on test.* to 'cake'@'localhost' indentified by 'cake';

php pages respond you with something like

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in H:\www\multi-cake\cake\libs\model\dbodbo_mysql.php on line 116

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in H:\www\multi-cake\cake\libs\modeldbodbo_mysql.php on line 119

The problem is given by the new mysql password hashing system. To solve the problem there are two ways. The first is to update the saved password with the command like

set password for 'cake'@'localhost' = old_password('cake');

the other is to run the mysql daemon with the old hashing algorithm, executing it with the --old-passwords paramter.

Advertisements

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