Symptoms
Users cannot be added to databases, and privileges cannot be added to database users. An error similar to the following can also be found in the cPanel error log.
[2024-12-26 22:46:40 +0530] warn [cpmysql] The system could not perform “GRANT” statements for the user “cpuser” due to errors: Cpanel::Exception::Database::Error/(XID x7fyu9) The system received an error from the “MySQL” database “mysql”: ER_PASSWORD_NO_MATCH (Can't find any matching row in the user table)
Description
The issue occurs when the skip-name-resolve option is enabled in the SQL service configuration. This option should be disabled.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
-
Backup the SQL configuration file.
cp -av /etc/my.cnf{,.$(date +%s)} -
Open the
/etc/my.cnffile in your preferred text editor. -
Comment out the
skip-name-resolveline.#skip-name-resolve=On
- Save the changes and exit the text editor.
-
Restart the SQL service.
/usr/local/cpanel/scripts/restartsrv_mysql