mysql客户端连接mysql数据库时报错如下
Warning: Using a password on the command line interface can be insecure.
ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: /home/bae/.jumbo/lib/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
(系统服务连接该数据库也会失败,mysql8.0.19)
原因
mysql8采用了新的加密方式,很多软件还不支持,将其加密方式改成原来方式即可。修改配置文件,为了长久解决问题,修改密码,配置生效。
修改配置文件,重启服务(长远解决问题)
先按照网上给的方案,修改配置文件 vi /etc/my.cnf
重启服务
service mysql stop
service mysql start
修改密码,不修改配置文件也可解决,但是只是临时。
登录连不上的mysql所在机器,进入mysql,如:mysql -h10.2.3.4 -P1234 -uroot -p1234
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '1234';
其他机器再次尝试连接该mysql,系统访问该mysql都成功,问题解决