環境: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