Navicat连接Mysql出现“plugin 'caching_sha_password' cannot be loaded”错误
问题现场
**官方说明:**https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html
解决方案
-
使用本地mysql命令行登录;
mysql -uroot -p
-
先查一下看看
--使用mysql库 USE mysql;
--查询一下
SELECT Host, User, plugin from user;
检查下“localhost”和“%”都应该为“mysql_native_password”
-
修改登录验证方式
--修改登录验证方式 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456'; ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
--使其生效
FLUSH PRIVILEGES;
-
验证下
- caching_sha_password password 错误 Navicat cachingcaching_sha_password password错误navicat caching_sha_password authentication caching_sha password navicat caching_sha password caching navicat authentication caching_sha password错误 caching_sha password错误caching authentication caching_sha password caching password runtimeerror cryptography caching_sha mysql authentication caching_sha password caching_sha插件password身份