mysql--SQLYog连接mysql时报错1251 client does not support authentication protocol requested by server;consider

解决办法:

1、Windows+r输入进入cmd,进入控制台

mysql--SQLYog连接mysql时报错1251 client does not support authentication protocol requested by server;consider_第1张图片

 

 2、在配置好环境变量的mysql中输入mysql -uroot -p ,之后输入密码

mysql--SQLYog连接mysql时报错1251 client does not support authentication protocol requested by server;consider_第2张图片

 

 3、依次输入:

USE mysql;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
FLUSH PRIVILEGES;

mysql--SQLYog连接mysql时报错1251 client does not support authentication protocol requested by server;consider_第3张图片

 

 

注:第3步名词解释:root是用户名,localhost是ip地址127.0.0.1都是特指本机,mysql_native_password是旧的密码验证机制,root是密码,最后别忘了分号;
4,在sqlyong中点击确定就可以连接成功

mysql--SQLYog连接mysql时报错1251 client does not support authentication protocol requested by server;consider_第4张图片

 

你可能感兴趣的:(mysql--SQLYog连接mysql时报错1251 client does not support authentication protocol requested by server;consider)