数据库
首页 > 数据库> > mysql报错:ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded

mysql报错:ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded

作者:互联网

mysql版本:8.0.28

报错提示:

 

 

原因:

最新的 docker mysql 8.0+ 以上版本, 更换了新的身份验证插件(caching_sha2_password), 原来的身份验证插件为(mysql_native_password)

 

解决办法:

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '密码';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '密码';
flush privileges;

 

标签:sha2,插件,plugin,身份验证,报错,mysql,password,native
来源: https://www.cnblogs.com/wangzy-Zj/p/16305398.html