EROR 4058 (HY000) : factor authenti cati on method does not match against authentication policy

1.问题

在 MySQL 8.0.27 中由 authentication_policy 来管理用户的身份认证:authentication_policy=caching_sha2_password,

在这里插入图片描述

2.解决方案

EROR 4058 (HY000) : factor authenti cati on method does not match against authentication policy_第1张图片
修改配置文件my.ini,将authentication_policy=caching_sha2_password, 改为:authentication_policy=*, 表示支持任意加密方式。修改完后,重启mysql服务。
EROR 4058 (HY000) : factor authenti cati on method does not match against authentication policy_第2张图片

SELECT user,authentication_string,plugin,host FROM mysql.user;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
ALTER USER '你自己的用户名就是上面查出来的user'@'你自己的host就是你上面查出来的host' IDENTIFIED WITH mysql_native_password BY 'root';

你可能感兴趣的:(工作经验,sql)