How to Change MySQL Password Policy

The latest MySQL servers come with a validated password plugin. This plugin configures a password policy to make server MySQL more secure.

While changing the password, I got the error: ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

Follow the below tutorial to change the password policy level for MySQL. Alternatively, you can also use this tutorial to remove the password policy plugin.

Change MySQL Password Policy

To change the default password policy level, we can change the settings at runtime using the command line or in the config file (my.cnf/mysqld.cnf) permanently.

Login to MySQL command prompt and execute the below query to view current settings of validate_password.

The default level is MEDIUM, we can change it to LOW by using the below query. The LOW level required only the password’s length to min 8 characters.

To make this setting permanent edit MySQL configuration (my.cnf) file and add below settings.

[mysqld]
validate_password_policy=LOW

Save the file and restart the MySQL service to apply changes.

Leave a Reply

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