1. 程式人生 > >MySQL8.0提示 caching_sha2_passwor‘ cannot be loaded

MySQL8.0提示 caching_sha2_passwor‘ cannot be loaded

local from $0 size 。。 can == col caching

今天在測試使用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