The latest MySQL servers come with a validated password plugin. This plugin configures a password policy to make server MySQL more secure.
While changing the password, I got the error: ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Follow the below tutorial to change the password policy level for MySQL. Alternatively, you can also use this tutorial to remove the password policy plugin.
Change MySQL Password Policy
To change the default password policy level, we can change the settings at runtime using the command line or in the config file (my.cnf/mysqld.cnf) permanently.
Login to MySQL command prompt and execute the below query to view current settings of validate_password.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
mysql> SHOW VARIABLES LIKE ‘validate_password%’;
+————————————–+——–+
| Variable_name | Value |
+————————————–+——–+
| validate_password_check_user_name | OFF |
| 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.06 sec)
|
The default level is MEDIUM, we can change it to LOW by using the below query. The LOW level required only the password’s length to min 8 characters.
1
2
3
|
mysql> SET GLOBAL validate_password_policy=LOW;
Query OK, 0 rows affected (0.02 sec)
|
To make this setting permanent edit MySQL configuration (my.cnf) file and add below settings.
[mysqld] validate_password_policy=LOW
Save the file and restart the MySQL service to apply changes.