声明:此文为转载内容,原作者地址:https://blog.csdn.net/weixin_44901190/article/details/125413925
1.报错内容
1251 client does not support authentication protocol requested by server;consider upgrading Mysql client
ERROR 1396 (HY000): Operation ALTER USER failed for ‘root’@‘localhost’。
2.报错原因:由于mysql8以前的加密规则与mysql8以后的存在差异。
3.问题解决:
1.登录mysql
2.修改加密规则
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
3.更新用户密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '1234';
4.刷新
FLUSH PRIVILEGES;
sqlyog再次连接mysql,就可以连接成功。
标签:sqlyog,mysql,Mysql,USER,1251,ALTER,localhost From: https://www.cnblogs.com/rong-xu-drum/p/16805071.html