解决Mysql8: 2059 – 身份验证插件’caching_sha2_password’-navicat连接异常

这个问题发生在MySQL8版本以上,所有密码默认被设置为caching_sha2_password,弱密码不允许使用

解决办法

查看默认的认证插件

mysql> show variables like 'default_authentication_plugin';

查看host,user,plugin

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

修改user指定host的加密插件为mysql_native_password

mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';  

注意:%指所有IP可以访问,通常用于测试环境

猜你喜欢

转载自blog.csdn.net/weiwoyonzhe/article/details/107048731