If you are getting the following message; "Error establishing a database connection", this is a cPanel bug in their 11.24.x release. Below, we have outlined how to resolve this issue:
* Find the configuration file of your database driven application (normally within the /public_html folder)
* Inside the configuration file (the file maybe called things like: wp-config.php, configure.php, config.php, configuration.php, etc…), you will see something that looks like this:
$database = "";
$dbusername = "";
$dbpassword = "";
$dbhost ="localhost";
* You will need to copy the "dbusername" and "dbpassword" from this configuration file.
* Then, please login to cPanel, and click on "MySQL"
* Next, we need to scroll down to "add new user"
* Input the SAME username and password and click "add new user"
* Your site will load now without any problems.
The above will fix the issue with the database connectivity that you have been having.
- 0 Users Found This Useful