Authentication plugin 'caching_sha2_password' cannot be loaded

Posted icebutterfly

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Authentication plugin 'caching_sha2_password' cannot be loaded相关的知识,希望对你有一定的参考价值。

问题:

连接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‘;

以上是关于Authentication plugin 'caching_sha2_password' cannot be loaded的主要内容,如果未能解决你的问题,请参考以下文章

关于数据库连接报错:Unable to load authentication plugin 'caching_sha2_password'.

mysql错误:this authentication plugin is not supported

authentication plugin caching_sha2

grafana "this authentication plugin is not supported"

java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.

mysql8.0 Authentication plugin 'caching_sha2_password' cannot be loaded