首页 > 数据库技术 > 详细

mysql 无法连接提示 Authentication plugin 'caching_sha2_password' cannot be loaded

时间:2020-12-14 10:28:48      阅读:31      评论:0      收藏:0      [点我收藏+]

 mysql 无法连接提示 Authentication plugin ‘caching_sha2_password‘ cannot be loaded

可能是密码没有设置或者,密码设置类型不符,可参考如下步骤解决

1 查看当前账户,和密码

select user,host,password from user;

或者是否设置了authentication_string

select user,host,authentication_string,plugin from mysql.user;

2 如果没有设置,就重置密码

grant all privileges on *.* to yourname@localhost identified by yourpassword

或者对应第二种情况

ALTER USER XXXX@% IDENTIFIED WITH mysql_native_password BY XXXXXXXX;

3 最后需要刷新下权限

flush privilege

4 如果是不重要的用户名,也可以通过新建用户赋予权限,

grant all privileges on *.* to xxx@localhost identified by xxxx ;

 

mysql 无法连接提示 Authentication plugin 'caching_sha2_password' cannot be loaded

原文:https://www.cnblogs.com/augustuss/p/14131397.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!