问题:链接mysql报出以下错误:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
网上找到命令即可解决。
1、切换到mysql数据库
user mysql
2、修改用户密码:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
root:用户名 localhost:127.0.0.1(本机)mysql_native_password:旧密码验证机制
3.flush privileges;
mysql设置用户或更改密码后用flush privilege刷新mysql的系统权限相关表,不然会拒绝访问。即重启mysql服务器,使得新修改或添加设置生效。
解决啦:
image.png
网友评论