Navicat for Mysql链接Mysql 8.0 出现1251- Client does not support authentication protocol 错误的解决办法
昨天刚重装完系统,所有东西全没了。刚装完mysql和navicat试着去连接一下,报了个错误。
Navicat for Mysql连接Mysql 8.0 出现1251- Client does not support authentication protocol 错误的解决办法
完全看不懂这个错误,有道翻译了下:
Navicat for Mysql连接Mysql 8.0 出现1251- Client does not support authentication protocol 错误的解决办法
说什么客户端不支持身份验证协议,没看明白,网上看各大神的解决办法:
错误原因是:mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password,
第一种解决办法:升级navicat的驱动
第二种:
(1)打开mysql的命令行,输入密码进入mysql
Navicat for Mysql连接Mysql 8.0 出现1251- Client does not support authentication protocol 错误的解决办法
(2)输入ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;
最后的password是你自己在安装mysql时候的密码
Navicat for Mysql连接Mysql 8.0 出现1251- Client does not support authentication protocol 错误的解决办法
(3)刷新一下权限。FLUSH PRIVILEGES;
Navicat for Mysql连接Mysql 8.0 出现1251- Client does not support authentication protocol 错误的解决办法
(4)重新尝试连接:
Navicat for Mysql连接Mysql 8.0 出现1251- Client does not support authentication protocol 错误的解决办法
解决了!

相关文章: