Home > Article > Backend Development > Client does not support authentication prot_PHP tutorial appears when connecting to mysql4.1 or above
Solution to the problem Client does not support authentication protocol when connecting to mysql4.1 or above
shell> mysql
Client does not support authentication protocol requested
by server; considering upgrading MySQL client
The official statement is
MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients. .....
If you encounter the above problems after upgrading mysql to version 4.1 or above, please first make sure your mysql client is version 4.1 or higher. (If you have problems under WINDOWS, just jump to the bottom to see the solution, because MYSQL is in WINDOWS is installed together with client and server)
Please use one of the following two methods
One:
mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Second:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;
Please modify the red part above according to your actual situation....
After doing this, the connection will be normal@!