In MySQL, we can use the SHOW GRANTS command to display all grant information of…
Fix – ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
When you want to create a user in MySQL with weak password, you will encounter the error “ERROR 1819 (HY000): Your password does not satisfy the current policy requirements“. This will tall you are using password that does not meet the recommended password policy requirement.
For example, I ran into the error when creating a user as shown
mysql> create user 'u_sharedhow'@'localhost' identified by 'testpassword';
How to Solve Your password does not satisfy the current policy requirements
There are 3 levels of password validation policy that enforced by the validate_password plugin
- LOW: Allows users to set a password of 8 or fewer characters.
- MEDIUM: Allows users to set a password of 8 or fewer characters with mixed cases and special characters.
- STRONG: Allows users to set a password that has all the attributes of a medium-level password with the inclusion of a dictionary file.
Base on above policy levels, you need to set the password an appropriate password.
To know the current password policy level, run the following command to show Password Validation Plugin system variables:
mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+--------+
| 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.01 sec)
Base on above output, the currently enforced password level is MEDIUM. So the password should be 8 characters long with a number, mixed case and special character.
mysql> create user 'u_sharedhow'@'localhost' identified by 'Testpassword@123#';
Query OK, 0 rows affected (0.36 sec)
It works now!.
This Post Has 0 Comments