mysql8.0版本 报错:Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol...

mysql8.0版本

报错:Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

解决办法(修改加密规则为普通模式,默认是严格加密模式):

1.打开命令行小黑屏,进入MySQL的bin目录,然后输入mysql -u root -p,输入密码

2.然后依次输入

ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘password’ PASSWORD EXPIRE NEVER; (修改加密规则 (必写))

ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’; (更新用户密码 )

FLUSH PRIVILEGES; #刷新权限(不输入也可以)

3.输入刚刚修改的密码,再次测试连接,搞定

    原文作者:初心不改_0055
    原文地址: https://www.jianshu.com/p/c8eb6d2471f8
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞