Trying to add a user to a database within cpanel but getting errors:
There was a problem adding the user: (XID xxxxxx) Database Error: Can’t find any matching row in the user table
I think a similar issue might be seen from phpmyadmin, but to fix the issue, ssh in to the server and first make a backup of the mysql configuration file
cp -rp /etc/my.cnf /etc/my.cnf.backup
then edit the original file and look for this line:
skip_name_resolve
if it’s there, remove the line and save the configuration file, then restart mysql:
/bin/systemctl restart mysql.service
Then if you already created the user, delete the user within cpanel and recreate it, then when you try to grant the user permissions to the database it should work this time.
From what I understand this is an issue with that skip_name_resolve setting only allowing ip addresses to be used with mysql grants, but cpanel tries to use “localhost” instead so it fails. For more information see
http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_skip-name-resolve