This is when mysql is initialized, a temporary password is used, and when the custom password is modified, because the custom password is relatively simple, there is a problem that it does not comply with the password policy.
Password policy problem exception information:
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
1. View the initial password policy of mysql,
Enter the statement ” SHOW VARIABLES LIKE ‘validate_password%’; ” to view,
2. First, you need to set the verification strength level of the password, and set the global parameter of validate_password_policy to LOW.
Enter the setting statement “set global validate_password_policy=LOW;” to set the value,
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 6-digit password, and set the global parameter of validate_password_length to 6.
Enter the setting statement “set global validate_password_length=6;” to set the value,
4. Now you can set a simple password for mysql, as long as it meets the length of six digits,
Enter the modification statement ” ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘123456’; ” You can see that the modification is successful, indicating that the password policy modification is successful! ! !
Note: The minimum length of the default password is 4, consisting of one uppercase/lowercase letter + one Arabic numeral + one special character,
As long as the length of the set password is less than 3, it will be automatically set to 4,
About mysql password policy related parameters;
1), validate_password_length The total length of the fixed password;
2), validate_password_dictionary_file specifies the file path for password verification;
3), validate_password_mixed_case_count The entire password must contain at least the total number of uppercase/lowercase letters;
4), validate_password_number_count The entire password must contain at least the number of Arabic numerals;
5), validate_password_policy specifies the strength verification level of the password, and the default is MEDIUM;
Regarding the value of validate_password_policy:
0/LOW: only verify the length;
1/MEDIUM: Verify length, numbers, case, special characters;
2/STRONG: Verify length, number, case, special characters, dictionary file;
6), validate_password_special_char_count The entire password must contain at least the number of special characters;
Leave A Comment?
You must be logged in to post a comment.