Just the other day I received an email from a MySQL user who has been struggling to set up his password due to the current policy requirements in MySQL. Let us see how we can identify what is his root cause and how to fix the issue with password security.
Whenever the user tried to set any password in MySQL, he faced following error:
Your Password does not Satisfy the Current Policy Requirements
After a while, he really got frustrated by this Current Policy Requirements for a password. You can check the current variables related to validating password by running the following command:
SHOW VARIABLES LIKE 'validate_password%'
When you run above command it will return following output in MySQL.
Now let us see how we can resolve our error.
From the image you can clearly see that there are various variables are set up for password validation. You can now change these variables based on your requirements. I personally prefer that you keep your password policy to strong, but there are times when it is not practical or is a business requirement.
Let us see various methods to resolve this issue.
Method 1: Let us see how we can set the password_policy to low:
SET GLOBAL validate_password_policy=LOW;
Method 2: You can also set the same variable in my.cnf file as well.[mysqld] validate_password_policy=LOW
Method 3: Uninstall Plugin which validates password
uninstall plugin validate_password;
Well, that’s it. As I said earlier, I strongly prefer that you keep your password complex and protect yourself from malicious attacks.
Reference: Pinal Dave (https://blog.sqlauthority.com)