Past week we have provisioned new infrastructure, post cPanel restore mySQL started giving error
mysqli_connect(): (28000/1045): Access denied for user 'username'@'localhost' (using password: YES)
but when I tried to create a new database from mySQL-Databse-wizard it worked, I was able to access PhpMyAdmin this time. To my surprise there were no database except ‘information_schema’ luckily I have backup of all databases.
I SSH’d to the server and found following in error logs
Although the system’s database map includes a MySQL user named “<db user>”, the MySQL server reported that no user with this name exists. Contact your system administrator
from cPanel, I have deleted the user and reCreated him and assigned to the database, this time all went smooth and sqlUser got required permissions on the database

Technical content writer at 9to5host.com, Linux is Life 😉