Bobcares

Error Establishing a Database Connection cPanel | Fixed

by | Jul 19, 2023

Learn how to fix the Error Establishing a Database Connection in cPanel. Our cPanel Support team is here to help you with your questions and concerns.

Error Establishing a Database Connection cPanel

If you have been running into the following error, you have come to the right place:

Error Establishing A Database Connection error

Error Establishing a Database Connection cPanel

According to our experts, the error is often due to misconfiguration of database access details.

We can avoid the error by ensuring these conditions are in place:

  • Database name and the existing database name match.
  • The username of the assigned database user is the same as the existing database username.
  • The password is the same as the one assigned to the database user.
  • The user has access privileges to the site’s database.

We can locate the database name, database username, and password in the wp-config.php file. This file can be found in the root directory of the WordPress installation.

How to access details in the cPanel paper_lantern theme

  1. First, we have to log into cPanel and navigate to the File Manager menu.
  2. Then, we must head to the root folder for the WordPress installation and open the wp-config.php file for editing.

    The file will contain the name, username, and password of the database assigned to our WordPress installation.

  3. Now, we have to head to the MySQL Databases in cPanel and check if there is a database with a name that is the same as the one in the wp-config.php file.
  4. Next, we have to scroll down and check the database username.
  5. Then, it is time to set the password to the one in the wp-config file.
  6. Finally, we have to ensure the user has access privileges to the database.
  7. Now, we have to click the All Privileges checkbox and apply the changes. After that, we will get a message letting us know that the MySQL User has been successfully added to the Database with all privileges.

How to access details in the cPanel x3 theme

  1. First, we have to log into cPanel and navigate to the File Manager menu.
  2. Then, select the Document Root for: option and choose the domain name linked to our WordPress installation.
  3. Next, we have to edit the wp-config.php file for editing.

    The file will contain the name, username, and password of the database assigned to our WordPress installation.

  4. Now, we have to head to the MySQL Databases in cPanel and check if there is a database with a name that is the same as the one in the wp-config.php file.
  5. Next, we have to scroll down and check the database username.
  6. Then, it is time to set the password to the one in the wp-config file.
  7. Finally, we have to ensure the user has access privileges to the database.
  8. Now, we have to click the All Privileges checkbox and apply the changes. After that, we will get a message letting us know that the MySQL User has been successfully added to the Database with all privileges.

After the database, its username, and password have been changed to the correct ones, we will not run into the Error Establishing A Database Connection error on our WordPress site.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

In brief, our Support Techs demonstrated how to resolve the Error Establishing a Database Connection in cPanel.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.