When many users connect to MySQL database with Navicat premium 12, authentication plugin ‘caching will appear_ sha2_ Error in password ‘cannot be loaded
The reason for this is that the encryption rule in versions before mysql8 is mysql_ native_ After mysql8, the encryption rule is caching_ sha2_ Password, there are two ways to solve the problem, one is to upgrade the Navicat driver, the other is to restore the MySQL user login password encryption rules to MySQL_ native_ password.
Here is the second way. The solution is as follows
1. Run the command prompt with administrator permission, log in MySQL (remember to add environment variables)
mysql -u root -p
Password: # login to MySQL
2. Modify the account password encryption rules and update the user password
ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘password’ PASSWORD EXPIRE NEVER; # Modify encryption rules
ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_ native_ password BY ‘password’; # Update the user’s password
3. Refresh permissions and reset password
FLUSH PRIVILEGES; # Refresh permissions
Screenshots of the above two steps
Separate password reset command: alter user ‘root’ @’localhost ‘identified by’ 111111 ‘
Now open Navicat premium 12 again to connect to the MySQL problem database, and you will find that the connection is successful