ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

This is the temporary password used during MySQL initialization. When modifying the user-defined password, it does not comply with the password policy because the user-defined password is relatively simple.

mysql> update  user set authentication_string=password('root') where user='root'
    -> ;
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

terms of settlement:

1. View the initial password policy of MySQL and
enter the statement “show variables like ‘validate”_ password%’; ” View,
as follows:

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

2. First, you need to set the authentication strength level of the password and set validate_ password_ If the global parameter of policy is low,
enter the setting statement “set global validate”_ password_ policy=LOW; ” Set values as follows:

mysql> set global validate_password_policy=LOW;
Query OK, 0 rows affected (0.03 sec)

3. The current password length is 8. If you don’t mind, you don’t need to modify it. Generally speaking, set it to a 4-digit password and set validate_ password_ The global parameter of length is 4,

Enter the set value statement “set global validate”_ password_ length=4; ” Set the value,

mysql> set global validate_password_length=4;
Query OK, 0 rows affected (0.03 sec)

4. Now you can set a simple password for MySQL, as long as it meets the length of six digits,
enter the modification statement “update user set authentication”_ string=password(‘root’) where user=‘root’; ” You can see that the password policy has been modified successfully!!!

mysql> update  user set authentication_string=password('root') where user='root';
Query OK, 1 row affected, 1 warning (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 1

Read More: