Database Error: Unable to connect to database
This FAQ will help you to understand database errors
Below are some examples of troubleshooting when you can't connect to your database.
Database Error: Unable to connect to the database:Could not connect to MySQL
Please ensure that the database name is correct and try again.
The database name is the name displayed when you access your MySQL databases through cPanel.
The username is the database username that was shown on-screen when you first created the database.
The password is the database password that was shown on-screen when you first created the database, unless you have since reset it.