码迷,mamicode.com
首页 > 数据库 > 详细

MySQL8.0提示 caching_sha2_passwor‘ cannot be loaded

时间:2018-07-10 12:52:14      阅读:1634      评论:0      收藏:0      [点我收藏+]

标签:alt   bsp   sql   连接   auth   size   host   inf   from   

今天在测试使用sqlyog或者navicat 去 连接MySQL8.0 的时候,出现如下报错提示:



ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: ?ò2?μ????¨μ??£?é?£



看样子是验证插件问题的,排查下:

SELECT `user`, `host`, `authentication_string`, `plugin` FROM mysql.user;


+------------------+-----------+------------------------------------------------------------------------+-----------------------+

| user             | host      | authentication_string                                                  | plugin                |

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

| archiver         | localhost | $A$005$==t@l=SP'G{U[1})D8yLwA6ti2uHtmUKNuHxQSUggrBRMBR2CheCw0Oxad9 | caching_sha2_password |

| mysql.infoschema | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| mysql.session    | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| mysql.sys        | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| root             | localhost | $A$005$==t@l=SP'G{U[1})D8yLwA6ti2uHtmUKNuHxQSUggrBRMBR2CheCw0Oxad9 | caching_sha2_password |

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

5 rows in set (0.06 sec)


  

修改arhiver账号的密码验证插件类型:

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

flush privileges;



再次看下,

SELECT `user`, `host`, `authentication_string`, `plugin` FROM mysql.user;

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

| user             | host      | authentication_string                                                  | plugin                |

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

| archiver         | %         | *13D295FD7B8108ABBC89FCDDD342FFBFF5DA803C                              | mysql_native_password |

| mysql.infoschema | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| mysql.session    | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| mysql.sys        | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE                              | mysql_native_password |

| root             | localhost | $A$005$==t@l=SP'G{U[1})D8yLwA6ti2uHtmUKNuHxQSUggrBRMBR2CheCw0Oxad9 | caching_sha2_password |

+------------------+-----------+------------------------------------------------------------------------+-----------------------+

5 rows in set (0.06 sec)



我们再用sqlyog 连接,发现是可以使用了。。






MySQL8.0提示 caching_sha2_passwor‘ cannot be loaded

标签:alt   bsp   sql   连接   auth   size   host   inf   from   

原文地址:http://blog.51cto.com/lee90/2139698

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!