1、客户端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
2、报错如下图所示:

在这里插入图片描述
解决方法:
原因是:linux服务器客户端mysql版本太低导致报错。

1、设置mysql8.0的yum源
cat > /etc/yum.repos.d/mysql-community.repo << EOF 
[mysql80-community] 
name=MySQL 8.0 Community Server 
baseurl=https://repo.mysql.com/yum/mysql-8.0-community/el/7/x86_64/ 
enabled=1 
gpgcheck=0
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 
EOF


2、安装mysql客户端
yum -y install mysql-community-client

3、测试验证:
mysql -uroot -h 127.0.0.1 -p
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐