Monday, July 9, 2007

MySQL Error 1251: Client does not support authentication protocol


MySQL 5.0 uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older (pre-4.1) clients. If you upgrade the server from 4.0, attempts to connect to it with an older client may fail giving you this error.

Solution:

Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function as follows:

mysql> SET PASSWORD FOR 'username'@'hostname' = OLD_PASSWORD('newpassword');

You are all set!!

No comments: