Sometime on MySQL, whenever we need to change password or create new User. it comes up with some ERROR 1819,Your password does not satisfy the current policy requirements . This happened because of validate_password plugin used to check password and improve security.

This maintain through two ways

1. In Any SQL statement that used to assign password on any user will be checked as per current password policy and reject if it is weak
2.VALIDATE_PASSWORD_STRENGTH SQl function take password as argument and return int value 0(weak) to 100 (strong)
This validate_password categories three level password Low, Medium and Strong. Validate_password_policy has definition like below.

  • LOW policy only tests password length. Passwords must at least 8 characters long.
  • Medium policy adds some conditions like passwords must contain at least 1 number, 1 lowercase, 1 uppercase, and 1 special (nonalphanumeric) character.
  • Strong policy adds the condition that password substrings of length 4 or longer must not match words in the dictionary file, if one has been specified.

Because of validate_password_policy we applied on database, we are not able to change and assign simple or weak passwords it don’t allow to to change password and came up with error.

ERROR 1819

mysql> create user 'ssirohi'@'%' identified by 'passw0rd';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements


We can resolve this thing easily with some temporary run time solution. First let’s see how to check problem. We can check validate_password_policy applied on machine through below method

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.01 sec)


We can also correct it for runtime.

mysql> SET GLOBAL validate_password_policy=LOW;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW VARIABLES LIKE 'validate_password_policy';
| Variable_name            | Value |
| validate_password_policy | LOW   |
1 row in set (0.01 sec)

Now you can change your password under Low policy, i don’t suggest you to uninstall validate_password_policy completely from machine. But this is temporary change only, this would change automatically in next restart of MySQL service to make it persistent in MySQL restart we need to make entry in my.cnf file

Below entry need to make in my.cnf to make it permanent.