MySQL Your password does not satisfy the current policy requirements

When i try to create MySQL user on a server, i get following error

mysql> GRANT ALL PRIVILEGES ON *.* TO 'centovacast'@'localhost' IDENTIFIED BY '*5B5F6EB22D64C7D8FE384BEF890B55964482A144' WITH GRANT OPTION;
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql>

This is due to MySQL validate password settings

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)

mysql>

To fix the error for current session, run

Advertisement

SET GLOBAL validate_password_mixed_case_count = 0;

Now password change will work.

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

mysql> GRANT ALL PRIVILEGES ON *.* TO 'centovacast'@'localhost' IDENTIFIED BY '*5B5F6EB22D64C7D8FE384BEF890B55964482A144' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql>

If you need it made permanent, then edit MySQL configuration file and add the line under [mysqld] section.

validate_password_mixed_case_count = 0
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement