[Solved] MYSQL ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

Problem background:

1. Connect the MySQL 8.0 database on the authorized machine. There is no problem with the account and password, and an error is reported

2. Use Navicat tool connects to version 8.0, and an error is reported

Troubleshooting ideas:

It may be that the creator did not specify a plug-in and used the plug-in provided with version 8.0. The encryption rule of version 8.0 MySQL is   caching_ sha2_ Password, need to be changed to   mysql_ native_ password

Solution:

1. The version of MySQL on the server is too low. Reinstall version 8.0 of MySQL and connect.

2. Change user name

3. Modify encryption rules

1) log in to MySQL with root and view the encryption rules of the current account

#Check the mysql version
select @@version;
#View encryption method
show variables like 'default_authentication_plugin';
#View user information
select host,user,plugin from mysql.user;

2) modify the encryption method (this is tested with the test account)

alter user 'test'@'%' identified with mysql_native_password by 'password';

Similar Posts: