欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

MySQL8.0报错Client does not support authentication protocol requested by server; consider upgrading My

程序员文章站 2022-06-12 22:30:33
...

首先输入:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

接下来设置密码:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password';

最后刷新:

FLUSH PRIVILEGES;

记得编码格式:

?useUnicode=true&characterEncoding=utf8
相关标签: MySQL