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

  1. Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
  2. Backup the SQL configuration file.

    cp -av /etc/my.cnf{,.$(date +%s)}
  3. Open the /etc/my.cnf file in your preferred text editor.

  4. Comment out the skip-name-resolve line.

    #skip-name-resolve=On
  5. Save the changes and exit the text editor.
  6. Restart the SQL service.

    /usr/local/cpanel/scripts/restartsrv_mysql