How to Solve Error establishing a database connection

0

Error establishing a database connection is a database connection problem that happens in wordpress websites, when we used more memory from our shared server or vps servers. The mysql server will stops & we will get a Error establishing a database in our wordpress websites.

wordpress Problem: 
when you do upgrade you had problems with images which I tried to resolve I then got the white screen. I am now back to
Error establishing a database connection


and if I try to use the admin page I receive

Error establishing a database connection


This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at mysql5.namesco.net. This could mean your host's database server is down.

  • Are you sure you have the correct username and password?
  • Are you sure that you have typed the correct hostname?
  • Are you sure that the database server is running?

If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.


How to solve this error Error establishing a database connection ?

  1. First, try contacting the hosting provider if the database server is online / if they have any other problem at their end, or they made any changes to your account, or if there are any limitations/restrictions, if the hosting package is set to Windows and not Linux, etc .
  2. Double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur.
  3. Then check that you don't need to change the database host from "localhost" to something else. You can get that info from your hosting provider.
  4. Check you have actually created a database with the same database name as is in your wp-config.php file.
  5. Last, but not least, if all that information is correct your database probably has a problem with it, and you may need to contact your hosting provider.

or

  1. Do NOT re-install WordPress. Try re-uploading all files & folders – except the wp-content folder – from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.
  2. You'll also need to recreate your wp-config.php file but that shouldn't be too difficult.
  3. Then run the upgrade manually via wp-admin/upgrade.php

Hope it will sove your Error establishing a database connection problem with wordpress

 

Please follow and like us:
0

We will be happy to hear your thoughts

Leave a reply