相关推荐recommended
mysql Your password does not satisfy the current policy requirements
作者:mmseoamin日期:2024-02-22

在修改密码时遇到 Your password does not satisfy the current policy requirements

原因:您的密码不符合当前策略要求,最好是把密码设置成复杂的,包括字母大小写、数字、特殊字符。

如果你还是先把数据库密码改简单,比如你本地使用,可以改成简单密码(服务器还是要使用复杂密码)。

1.然后查看当前默认规则: 

SHOW VARIABLES LIKE 'validate_password%';

 mysql5.7版本的 变量是下划线 validate_password_policy

mysql Your password does not satisfy the current policy requirements,第1张

 mysql8版本的变量中间是点  validate_password.policy 

mysql Your password does not satisfy the current policy requirements,第2张

2.修改校验密码策略等级 set global validate_password.policy=LOW;

set global validate_password_policy=LOW;

set global validate_password.length=6;  设置密码长度至少为 6

3.从新设置密码

 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '12345678' WITH GRANT OPTION;  
  flush privileges;    
 

 ok