1. Home
  2. Databases
  3. How to disable MySQL Password Validation plugin

How to disable MySQL Password Validation plugin

I had recently Installed MySQL v5.7 on Debian 8 Jessie. After the successful installation of MySQL, to improve the security of MySQL installation, ran the below command:

# mysql_secure_installation

The above command will prompt for the root password. Enter the password you created during the installation. A series of questions are asked for which you need to say yes or no. In the series of of question, the first question is :

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:

If you had pressed yes, then the successive question is:

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary                  file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG:

Based on the level of password validation policy set above, the user creation and password setting, should comply to above policy you had set. No doubt, this is a very good feature, but annoying also!

Note: I strongly recommend enabling this plugin. In case, if you need to disable it, then here’s the guide.

disable MySQL password validation plugin

How to disable MySQL password validation plugin

Step 1: Login to MySQL :

#mysql -h localhost -u root -p
Enter Password:

mysql> uninstall plugin validate_password;
Query OK, 0 rows affected (0.02 sec)
Change the password validation policy to LOW

If you are not able to remove the plugin, then reduce the password validation policy to LOW in /etc/my.cnf as below and then run mysql_secure_installation, set an easy password for root, login to the mysql system and then run the uninstall plugin command.

# vim /etc/my.cnf
validate_password_policy=LOW

How to enable password validation in MySQL

Step 1: Login to MySQL :

#mysql -h localhost -u root -p
Enter Password:

mysql> mysql> install plugin validate_password SONAME 'validate_password.so';
Query OK, 0 rows affected (0.02 sec)

However annoying during the user creation, you need to use such security plugins to make sure you are secure.

Updated on November 9, 2017

Was this article helpful?

Related Articles

Add A Comment