问题:

连接Docker启动的mysql出现:ERROR 2059 (HY000): Authentication plugin
‘caching_sha2_password’ cannot be loaded

C:\mysqldata>mysql -h 127.0.0.1 -P 13306 -uroot -p Enter password:
** ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded: ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£

解决方案:

1.进入mysql容器

docker exec -it mysql2 /bin/bash

2.进入mysql

mysql -uroot -pmima

3.修改密码

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';

可能是 MySQL 版本太新造成的》。。

参考资料:

1、ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded
https://www.cnblogs.com/chuancheng/p/8964385.html

2、2059 - authentication plugin ‘caching_sha2_password’ -navicat连接异常问题解决
https://blog.csdn.net/m0_38017782/article/details/80061991


Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐