1251-client does not support authentication protocol requested by server
今天在安装完mysql的后 ,使用Navicat连接mysql数据库的时候,出现如上图片的错误。特来总结:
解决方案:
在mysql主机登录后
1.查看用户信息
select host,user,plugin,authentication_string from mysql.user;
备注:
host为 % 表示不限制ip
localhost表示本机使用
plugin非mysql_native_password 则需要修改密码
2.修改用户密码
ALTER USER ‘root’@‘localhosst’ IDENTIFIED WITH mysql_native_password BY ‘newpassword’; #更新一下用户的密码 root用户密码为newpassword
1
现在就可以连接mysql了。