mysql5.7 Your password does not satisfy the current policy requirements问题解决

时间:2023-03-10 05:59:25
mysql5.7 Your password does not satisfy the current policy requirements问题解决

安装mysql5.7rpm包,在更改密码的时候,提示错误

mysql5.7 Your password does not satisfy the current policy requirements问题解决

这是由于Mysql5.7默认对于密码的要求强度较高,设置的密码过于简单不予通过。要解决这个问题,涉及到的参数有validate_password_policy和validate_password_length。

validate_password_policy有以下取值:

Policy Tests Performed
0 or LOW Length
1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters
2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file

0是只要密码长度符合即可 ;1是必须符合长度,且必须含有数字,小写或大写字母,特殊字符;2是必须符合长度,且必须含有数字,小写或大写字母,特殊字符,字典文件。默认是1。validate_password_length是设置密码长度。

所以解决的办法是:

1、设置密码安全级别。

mysql5.7 Your password does not satisfy the current policy requirements问题解决

2、设置密码长度

mysql5.7 Your password does not satisfy the current policy requirements问题解决

3、更改密码

mysql5.7 Your password does not satisfy the current policy requirements问题解决