Fixing ESTABLISHING A DATABASE CONNECTION error Print

  • 0

Fixing ESTABLISHING A DATABASE CONNECTION error.

This article covers how to resolve the Establishing A Database Connection error.

Ensure that the following conditions are satisfied:

a) Database name matches the existing database name

b) Username of the database user is the same the existing database username

c) Password is the same as the one assigned to the specified database user

d) Specified user has access privileges to the site’s database.

 

Do the following, to get the Database name, username and password, which can be found in the wp-config.php file. 



1. Login to your cPanel and scroll to the File Section and click on the File Manager option:



2. Go to the public_html folder 

3. Right-Click on the wp-config.php file and select the Edit or View option:



4. The file should contain the name, username and password of the database assigned to your WordPress installation


Once you have found the database details in opened file, then now to confirm if they are correct.


5. Go to MySQL Databases in cPanel:



6. Carefully check if there is a database which name fully matches the one specified in the wp-config.php file:


7. Then check the database username if uts the same as the one in the wp-config file


8. Set the password to the one specified in the wp-config file Then, it is necessary to make sure that the specified user has access privileges to the database:



Click on the All Privileges checkbox and apply the changes. Once done, you will get the message stating that MySQL User has been successfully added to the Database with all privileges



After doing this then your error should be fixed if not contact our Team.


Was this answer helpful?

« Back