MySQL 8 Your password does not satisfy the current policy requirements

When transferring a website from one Cpanel server to another server running MySQL 8, I got the following error message

Cpanel::Exception::Database::Error/(XID u99as8) The system received an error from the “MySQL” database “mysql”: 
1819 (Your password does not satisfy the current policy requirements)

The error is due to validate_password component.

https://dev.mysql.com/doc/mysql-secure-deployment-guide/8.0/en/secure-deployment-password-validation.html

Method 1

Edit mysql configuration file, add following under [mysqld] section.

validate_password.policy=0

Policy 0 is LOW, default value is 1, that is MEDIUM.

Restart MySQL

systemctl restart mysqld

Method 2: Disable Password Validation Component

To check if MySQL Password Validation Component is enabled, run the command

mysql -sse "SELECT * FROM mysql.component"

If you have Password Validation Component enabled, you will see

[root@server2 ~]# mysql -sse "SELECT * FROM mysql.component"
1	1	file://component_validate_password
[root@server2 ~]#

To disable the component, run

mysql -sse "UNINSTALL COMPONENT 'file://component_validate_password';"

Back to MySQL 8

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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