Error Messages > Client does not support authentication protocol requested by server; consider upgrading MySQL client

Categories

Error Messages

Definition

In MySQL version 4.1, the authentication protocol used for MySQL client-server communications was changed to make it more secure. This changed the format of hashed user passwords and broke compatibility for all clients and APIs designed against MySQL 4.0.

Sample

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL

Resolution

  • Upgrade to a 4.1 or higher version of the mysql client.
  • Upgrade the API used to one compatible with MySQL 4.1.
    • PHP users can use mysqli or PDO instead of the standard mysql extension. PHP users can also attempt to compile the mysql extension against MySQL 4.1.
    • .NET Users can use Connector/NET instead of Connector/ODBC.
  • Run the MySQL server in a mode that uses old password hashing by adding old-passwords to the [mysqld] section of your my.cnf file.
  • Update the password of the user who needs to connect from an old-protocol application to use the deprecated password format with this command:

    SET PASSWORD FOR ‘user’@'host’ = OLD_PASSWORD(’password’);

Further Reference

Client does not support authentication protocol (MySQL Reference Manual)

Password Hashing as of MySQL 4.1 (MySQL Reference Manual)

mysqli Extension

MySQL APIs (Drivers) for Various Languages

Leave a Reply