
client does not support authentication protocol requested by server;consider upgrading MySQL client
在连接mysql时出现如下错误, client does not support authentication protocol requested by server;consider upgrading MySQL client
2.问题解决 在参考了 mysql服务设置远程连接的博文之后成功得以解决,在此感谢大佬的分享,解决了这个神烦的问题。 为了避免下次遇到类似问题无法解决,故作次博文。 首先通过命令行登录mysql服务。
mysql -u root -p登录成功后,切换数据库到mysql
use mysql查询密码保存信
select host,user,plugin,authentication_string from mysql.user;这时发现,所有用户的plugin字段数据均为sha2加密后保存的,那么在客户端发起连接时,会出现密码不匹配的情况发生,从而导致授权失败。
修改密码并指定密码保存格式
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'yourpassword';重新查询
select host,user,plugin,authentication_string from mysql.user;此时看到root用户的密码保存方式已经改为本地方式了。 到这一步,如果还不能解决,那么再重新授权一下。
grant all privileges on *.* to 'root' @'%' with grant option;到此问题,得以解决。
好记性不如烂笔头,日积月累方能登高望远__
👁️ 阅读量:0
© 版权声明:本文《client does not support authentication protocol requested by server;consider upgrading MySQL client》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686554666a290571.html。