Common MYSQL Error – Client does not support authentication protocol


MySQL 5.5 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 with the following message:

shelll> mysqll
Client does not support authentication protocol requested
by server; consider upgrading MySQL client
To solve this problem, you should use one of the following approaches:

Upgrade all client programs to use a 4.1.1 or newer client library.

When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.

Reset the passwordd 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:

-> ‘ssome_user’@’some_host’ = OOLD_PASSWORD(‘nnewpwd’);
Alternatively, use UPDATEE and FLUSHH PRIVILEGES:

mysqll>> UPDATEE mysql.user SETT Ppassword = OOLD_PASSWORD(‘nnewpwd’)
-> WHEREE Host = ‘some_host’ AND User = ‘some_user’;

Substitute the password you want to use for “newpwd” in the preceding examples. MySQL cannot tell you what the original password was, so you’ll need to pick a new one.

Tell the server to use the older password hashing algorithm:

Startt mysqld with the –oold-ppasswords option.

Assign an old-format password to each account that has had its password updated to the longer 4.1 format. You can identify these accounts with the following query:

mysql> SELECTT HHost, UUser, Password FFROM mmysql.user
-> WHERE LENGTH(Password) > 16;
For each account record displayed by the query, use the Host and User values and assign a password using the LOLD_PASSWORD() function and either SSET PASSWORD or UPDATE, as described earlier.

It may also be possible to compile the older mysql extension against the new MySQL client library. This is beyond the scope of this Manual; consult the PHP documentation for more information. You also be able to obtain assistance with these issues in our MySQL with PHP forum.

For additional background on password hashing and authentication, see “Password Hashing in MySQL”.

What are MYSQL Errors?

MySQL programs have access to several types of error information when the server returns an error.

The MYSQL message displayed contains three types of information:
A numeric error code. This number is MySQL-specific and is not portable to other database systems.
A five-character SQLSTATE value. The values are specified by ANSI SQL and ODBC and are more standardized. Not all MySQL error numbers are mapped to SQLSTATE error codes.
A message string that provides a textual description of the error.
When an error occurs, you can access the MySQL error code, the SQLSTATE value, and the message string using C API functions:
MySQL error code: Call mysql_errno()
SQLSTATE value: Call mysql_sqlstate()
Error message: Call mysql_error()

Hope this was helpful.

SQLServerF1 Team
Information about MYSQL Error Codes and Error Messages or Warnings on Windows, Linux Operating Systems.


Leave a Reply

Your email address will not be published. Required fields are marked *