• notice
  • Congratulations on the launch of the Sought Tech site

MySQL client does not support the solution to the identification protocol

MySQL 5.1 uses an authentication protocol based on a password hashing algorithm, which is incompatible with the protocol used by earlier clients (prior to 4.1).If you upgrade your server to above 4.1, connecting with earlier clients may fail with the following message:

shell> mysql

The client does not support the authentication protocol requested by the server: consider upgrading the MySQL client.

To resolve this issue, use one of the following methods:

·Upgrade all client programs to use the 4.1.1 or newer client library.

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

·Revert the password to the pre-4.1 style for every user who needs to use a pre-4.1 client.This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:

·mysql> SET PASSWORD FOR
·-> 'some_user'@'some_host'=OLD_PASSWORD('newpwd');
UPDATE and FLUSH PRIVILEGES can also be used:
mysql> UPDATE mysql.user SET Password=OLD_PASSWORD('newpwd')
-> WHERE Host='some_host' AND User='some_user';
mysql> FLUSH PRIVILEGES;

Replace "newpwd" in the previous example with the password you intend to use.MySQL cannot tell you what the original password was, so you need to choose a new password.

·Notify the server to use the old password hashing algorithm:

1.Start mysqld with the "--old-passwords" option.

2.For each account whose password has been updated to the longer 4.1 format, assign it a password with the old format.These accounts can be identified using the following query:

3.

mysql> SELECT Host, User, Password FROM mysql.user

4.

-> WHERE LENGTH(Password) > 16;

For each account record displayed by the query, use the Host and User values, and specify the password using the OLD_PASSWORD() function and one of SET PASSWORD or UPDATE, as described earlier.

Note: In earlier PHP versions, the mysql extension does not support MySQL 4.1.1 and later Authentication protocol in.It is correct regardless of the PHP version used.If you plan to use the mysql extension with MySQL 4.1 or later, you will need to configure MySQL for use with older clients using one of the options described earlier.The mysqli extension (support for "Improved MySQL", added in PHP 5) is compatible with the improved password hashing algorithm used in MySQL 4.1 and later, and requires no special configuration of MySQL to use the MySQL client library.

Tags

Technical otaku

Sought technology together

Related Topic

1 Comments

author

atorvastatin 40mg tablet & lt;a href="https://lipiws.top/"& gt;lipitor 20mg drug& lt;/a& gt; order atorvastatin online cheap

Dmtrsg

2024-03-07

Leave a Reply

+