MySql错误 1251 - Client does not support authentication protocol requested by server

报错提示

MySql错误 1251 - Client does not support authentication protocol requested by server_第1张图片

方案

第1步:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

123456 是 安装mysql时设置的密码

MySql错误 1251 - Client does not support authentication protocol requested by server_第2张图片

第2步:

FLUSH PRIVILEGES;

MySql错误 1251 - Client does not support authentication protocol requested by server_第3张图片

MySql错误 1251 - Client does not support authentication protocol requested by server_第4张图片

也可以通过此方法修改mysql密码

比如我的mysql密码是123456我想改成666666

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '666666';

参考

Navicat for Mysql报错1251连接不成功Mysql

你可能感兴趣的:(MySql,mysql,数据库)