MySql pwd policy requirement

2021/12/24 19:10:22

本文主要是介绍MySql pwd policy requirement,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

When meet "ERROR 1819 (HY000): Your password does not satisfy the current policy requirements".

There are 2 ways to fix it,

1. Adjust the pwd validation policy.

There are three levels of password validation policy enforced when Validate Password plugin is enabled:

  • LOW Length >= 8 characters.
  • MEDIUM Length >= 8, numeric, mixed case, and special characters.
  • STRONG Length >= 8, numeric, mixed case, special characters and dictionary file.
mysql> SHOW VARIABLES LIKE 'validate_password%';

The output will be similar as:

+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| validate_password.check_user_name    | ON     |
| validate_password.dictionary_file    |        |
| validate_password.length             | 8      |
| validate_password.mixed_case_count   | 1      |
| validate_password.number_count       | 1      |
| validate_password.policy             | MEDIUM |
| validate_password.special_char_count | 1      |
+--------------------------------------+--------+
7 rows in set (0.09 sec)

Then change he policy,

mysql> SET GLOBAL validate_password.policy=LOW;
or mysql> SET GLOBAL validate_password.policy=0;

After that you can change the pwd of a particular account,
mysql> create user 'senthil'@'localhost' identified by 'password';

2. Disable the validation policy.

Login the mysql server,
$ mysql -u root -p

Temporarily change the policy,
mysql> UNINSTALL COMPONENT "file://component_validate_password";

 Finally, enable Validate Password component:

mysql> INSTALL COMPONENT "file://component_validate_password";


 


这篇关于MySql pwd policy requirement的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程