1. Log in to your cPanel
2. Under Databases category, click MySQL Databases
As you can see on the MySQL page, all databases are intact. The databases are there and also the users. But eventhough they are there, your site wasn't able to connect on the database. Follow the next step.
3. Locate the category which will allow you to add a user to the database. Add User To Database
4. Select the appropriate user and database you have used for your website and click the Add button. Note: Be sure to choose the correct one or it will not worked.
5. You will be redirected to the Manage User Privileges page, select ALL PRIVILEGES then click the Make Changes button.
6. If all are successful, your site will be working.