After MYSQL 4.1, a new user authentication protocol is adopted. For old clients that do not support the authentication protocol, the following solutions are provided on the official website ﹔
1 Upgrade all client programs to use a 4.1.1 or newer client library.
Update the client library, which requires updating the PHP extension library. For the old api PHP, this extension library is no longer provided.
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.
Using the previously established account connection will not work for accounts created under the new authentication protocol
3 Reset the password 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: mysql> SET PASSWORD
-> 'Some _ user' @ 'some _ host' = OLD_PASSWORD ('newpwd ');
Alternatively, use UPDATE and flush privileges: mysql> UPDATE mysql. user SET Password = OLD_PASSWORD ('newpwd')-> WHERE Host = 'some _ host' AND User = 'some _ user ';
Mysql> flush privileges;
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.
This is a good method. The new account uses the old-fashioned encryption protocol.
4 Tell the server to use the older password hashing algorithm:
Start mysqld with the -- old-passwords option.
In this way, the advantages of the new authentication protocol cannot be used.
5 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> SELECT Host, User, Password FROM mysql. 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 OLD_PASSWORD () function and either set password or UPDATE, as described earlier.
Restore the old style with the upgraded Password