原 MySQL 5客户端连接MySQL 9服务器时报错 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
现象
MySQL服务器是9.2的,客户端是mariadb 5.5的:
1 2 3 | [root@alldb ~]# mysql -uroot -plhr -h127.0.0.1 -P3420 -e "select now(),@@hostname,@@version;" 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 [root@alldb ~]# |
原因
你的 MySQL 客户端版本 太老了,不支持 caching_sha2_password
认证插件。
具体来说: