How to Fix “MySQL ERROR 1819 (HY000):” In Linux: your password does not satisfy the current policy requirements
Are you having an error like the “your password does not satisfy the current policy requirements” message then you must be creating a MySQL user with a relatively weak password? You will see this error if you are using a password that does not meet the recommended password policy requirements.
Only one reason to encounter your password does not satisfy the current policy requirements error is using a weak password while creating a MySQL user.
How To Fix Error 1819 (hy000): your password does not satisfy the current policy requirements
One quick solution to fix error 1819 (hy000): your password does not satisfy the current policy requirements is to use a strong password but if you still want to use a weak password then don’t worry we will give you a solution for it too.
In MySQL, there is 3 levels password validation policy that checks the password strength. Different levels of password validation policy are:
- LOW: This rule allows users to create a weak password and that is a password of 8 or fewer characters.
- MEDIUM: This rule allows users to create passwords of 8 or fewer characters with mixed cases and special characters.
- STRONG: This rule allows users to create strong passwords with the combination of the dictionary files.
These different password policies are maintained by the validate_password plugin that is loaded with MySQL. You can run the command to confirm the password policy level:
$ SHOW VARIABLES LIKE 'validate_password%';
By default, the password policy is set to MEDIUM. If you run the command and get the output empty set, then the plugin is not enabled yet. Sometimes you might see an empty result after executing the above command and the reason for the empty output is the plugin has not been activated yet. Run the following command to activate or enable the validate_password plugin
mysql> select plugin_name, plugin_status from information_schema.plugins where plugin_name like 'validate%'; mysql> install plugin validate_password soname 'validate_password.so';
Now, you can run the following command to confirm that the plugin is activated.
mysql> select plugin_name, plugin_status from information_schema.plugins where plugin_name like 'validate%';
How To Change MySQL Password Validation Policy
We won’t suggest you create a weak password by changing the MySQL password validation policy but if you still want to create a weak password then go through the following steps to resolve the MySQL ERROR 1819 (HY000) error by setting a lower password validation policy as shown. Run the following command to change MySQL password validation policy.
mysql> SET GLOBAL validate_password_policy=LOW; OR mysql> SET GLOBAL validate_password_policy=0;
Now, run the following command to confirm the password validation policy level.
$ SHOW VARIABLES LIKE 'validate_password%';
As you have changed the MySQL password validation policy, now you can easily create a user with a weak password.
mysql> create user ‘itsubuntu’@’localhost’ IDENTIFIED BY ‘weakpassword’;
Summary:
For now, we have solved the error your password does not satisfy the current policy requirements by changing the MySQL password validation policy but we don’t suggest you to use a weak password.