Troubleshooting Database Connection Failed Errors
If your web application, such as WordPress or Joomla, displays an error indicating that it cannot connect to the database, one or more configuration settings within the application's configuration file are likely incorrect. The application needs the exact details to communicate with the MySQL or MariaDB server.
Potential Causes for Connection Failure
A database connection error will occur if any of the following conditions are met within your application's configuration file (e.g., wp-config.php):
- The database username provided is incorrect.
- The database password provided is incorrect.
- The database name specified in the configuration is incorrect.
- The database server location (host) is incorrect. The correct setting for most services is localhost.
- The database server itself is temporarily unavailable or down for maintenance.
Resolution Steps
You must first ensure that the database name, username, and password entered in your application's configuration file exactly match the credentials found in the MySQL Databases section of your cPanel account. Confirm the host setting is correct (usually localhost), and then attempt to reload your website.
If the problem persists after verifying all database information is correct, please contact our technical support team, and we will be happy to assist you with further diagnostics.