MySQL [06] MySQL authentication protocol Problems

Source: Internet
Author: User
Client does not support Authentication Protocol requested by Server

1 -- error Cause Analysis

A problem encountered when the system was launched today: executableProgramUse static library compilation provided by mysql4.0.22. The database server is 5.0.33 during runtime. When the program actually connects to the database, the following error message is displayed. Client does not support Authentication Protocol requested by server; consider upgrading MYSQL client

Query MySQL help documentation, which provides the prompt MySQL 5.1 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 message

The reason is that MySQL has used different authentication protocols since MySQL 4.1. The protocol is very different from the versions earlier than MySQL 4.1. Therefore, if your client is a version earlier than 4.1, this error will occur when you connect to a database of a later version.

2 -- Solution

1. Upgrade all client programs to use a 4.1.1 or newer client library
Upgrade the client program to use the client library of version 4.1.1 or later.

2, when connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style Password
When connecting to the database, use the existing account that has been upgraded. These accounts use the password format earlier than 4.1.

3. Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program
Use the password format earlier than 4.1 to reset the account password, FunctionSet PasswordAndOld_password ()Used to complete the modification. You can reset it using any of the following methods.
Method 1:

 
Mysql> set password for 'some _ user' @ 'some _ host' = old_password ('newpwd ');

Method 2:

 
Mysql> Update mysql. User SET Password = old_password ('newpwd')-> where host = 'some _ host' and user = 'some _ user'; mysql> flush privileges;
3-References

1. http://dev.mysql.com/doc/refman/5.1/en/old-client.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.