MySQL8.0提示 caching_sha2_passwor‘ cannot be loaded

Posted

tags:

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

今天在测试使用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$[email protected]=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$[email protected]=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$[email protected]=SP'G{U[1})D8yLwA6ti2uHtmUKNuHxQSUggrBRMBR2CheCw0Oxad9 | caching_sha2_password |

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

5 rows in set (0.06 sec)



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






以上是关于MySQL8.0提示 caching_sha2_passwor‘ cannot be loaded的主要内容,如果未能解决你的问题,请参考以下文章

mysql8.0 caching_sha2_password的坑

MySQL8.0新特性——默认使用caching_sha2_password作为身份验证插件

mysql Authentication plugin 'caching_sha2_password' is not supported问题处理

mysql Authentication plugin 'caching_sha2_password' is not supported问题处理

远程连接mysql8.0,Error No.2058 Plugin caching_sha2_password could not be loaded

Mysql8.0升级后,Navicat连接报错caching_sha2_password 问题