环境:centos7.2,mysql80社区版
现象如下
1)某台centos(非mysql主机)
ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/local/Percona-Server-5.5.35-rel33.0-611.Linux.x86_64/lib/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
2)本地navicat连接
分析:
1)什么是caching_sha2_password?
mysql的一个认证的插件——MySQL 8.0.4开始默认使用caching_sha2_password作为认证的插件,对于之前的版本的mysql,默认的认证插件为mysql_native_password。
解决方法:
1)在mysql主机运行如下命令
select host,user,plugin from mysql.user;
2)更改加密方式
ALTER USER 'master'@'%' IDENTIFIED WITH mysql_native_password BY 'MyNewPass!';
3)没了。
参考:
1)https://blog.csdn.net/weixin_40393909/article/details/80390315
2) https://majing.io/posts/10000021031192