TECHIES WORLD

For Techs.... Techniques.... Technologies....

BashCpanelLinuxMysql

How to change the MySQL password policy level

MySQL used a plugin called validate_password which setup the password policy level.

There are three password policy levels in MySQL - LOW, MEDIUM and HIGH.

The current value of password policy level can be checked using the following query.

>SHOW VARIABLES LIKE 'validate_password%';

To modify the password policy to a specific level, the following query can be used.

>SET GLOBAL validate_password_policy=LEVEL;

Where LEVEL need to be replaced with the required value. i.e. LOW, MEDIUM and HIGH.

Please note that this change is temporary and will automatically revert back to earlier state after the MySQL service restart.

To make the the password policy to a specific level permanent, update the following lines under the [mysqld] section in MySQL configuration file.

[mysqld]
validate_password_policy=LEVEL

Where LEVEL need to be replaced with the required value. i.e. LOW, MEDIUM and HIGH.

Then restart the MySQL service to apply the configuration changes.

That's all…

Leave a Reply