Title: Error Establishing Database Connection
Last modified: August 21, 2016

---

# Error Establishing Database Connection

 *  [shadowx20](https://wordpress.org/support/users/shadowx20/)
 * (@shadowx20)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-68/)
 * Greetings WordPress,
    I am facing a huge problem all of a sudden when I saw my
   website hosted on 000webhost going insane with php memory limit . I decided to
   create a backup of the website and test it on local host but I am facing the “
   Error Database Connection”. I have done the following fixes :
 * WP-Config – DB Name, Host, User,Password – all replaced
    Repair.php – Fails stating
   an error “Error Establishing Database Connection” dbtest.php – checked that wordpress
   connects to the database (successful)
 * However when I go wp-admin I get the following error :
 * 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 mysql6.000webhost.
   com. This could mean your host’s database server is down.
 * I cant seem to find “mysql6.000webhost.com”

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-68/#post-3888270)
 * You need to contact your hosting provider. BTW, it is a very common problem with
   most of the free hosting services, especially your current host. Consider changing
   to a better hosting service.
 *  Thread Starter [shadowx20](https://wordpress.org/support/users/shadowx20/)
 * (@shadowx20)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-68/#post-3888286)
 * Thanks for replying
    but I want to test the website on the local server? I dont
   know what changes should I do?
 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-68/#post-3888296)
 * > but I want to test the website on the local server?
 * You may import the site to your local server and change the current URLs to match
   your local server’s given URLs.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error Establishing Database Connection’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Krishna](https://wordpress.org/support/users/1nexus/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-68/#post-3888296)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
