navicat连接MySQL8.0时出现1251错误

1251 -Client does not support authentication protocol requested by server;consider upgrading MySQL client

Navicat连接MySQL8.0时,出现这个错误,记录一下解决办法。
1.打开MySQL的控制台
2.输入自己设置的密码

mysql> alter user root@localhost identified by 'newpassword' password expire never;

mysql> alter user root@localhost identified with mysql_native_password by 'newpassword';

mysql> flush privileges;    # 刷新权限

百度得到出现此问题的原因是:mysql8.0和5.7的加密规则不一样,所以连接会报错;

发布了12 篇原创文章 · 获赞 1 · 访问量 1060

猜你喜欢

转载自blog.csdn.net/Genjicoo/article/details/100175953