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
1 2 |
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.
Method 1
Edit mysql configuration file, add following under [mysqld] section.
1 |
validate_password.policy=0 |
Policy 0 is LOW, default value is 1, that is MEDIUM.
Restart MySQL
1 |
systemctl restart mysqld |
Method 2: Disable Password Validation Component
To check if MySQL Password Validation Component is enabled, run the command
1 |
mysql -sse "SELECT * FROM mysql.component" |
If you have Password Validation Component enabled, you will see
1 2 3 |
[root@server2 ~]# mysql -sse "SELECT * FROM mysql.component" 1 1 file://component_validate_password [root@server2 ~]# |
To disable the component, run
1 |
mysql -sse "UNINSTALL COMPONENT 'file://component_validate_password';" |
Back to MySQL 8