Title: MySQL Database not connecting
Last modified: August 31, 2016

---

# MySQL Database not connecting

 *  [Robski](https://wordpress.org/support/users/robski/)
 * (@robski)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/mysql-database-not-connecting/)
 * Every time I try to connect my website to MySQL Database, it says that it can’t
   connect because of either the two reasons:
 * – Incorrect Username/Password
    – Cannot connect to database
 * I tried this on 3 websites, and none work
 * Please help fast!
 * (My host is 000webhost)

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

 *  Thread Starter [Robski](https://wordpress.org/support/users/robski/)
 * (@robski)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/mysql-database-not-connecting/#post-6924389)
 * Also, I tried inputting it manually
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/mysql-database-not-connecting/#post-6924418)
 * In nutshell, you’re getting this error because WP is unable to establish a database
   connection. Reason why WP is unable to establish a database connection can vary.
   It could be that your database login credentials are wrong or have been changed.
   It could be that your database server is unresponsive. It could be that your 
   database has been corrupted. Majority of the times this error happens because
   of some sort of server error. Also, there could be other factors as well. To 
   troubleshooting this problem:
    – double check your [wp-config.php file settings ](http://codex.wordpress.org/Editing_wp-config.php)
   for the database name, database username and database password, and the host 
   name (e.g., “localhost” Vs. something else). This is where most errors occur.–
   Then make sure wp-config.php is in right location. – 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. – Check you have actually created a
   database with the same database name as is in your wp-config.php file. – Last,
   but not least, if all that information is correct your database probably has 
   a problem with it. Contact your hosting provider if the database server is offline(
   if the problem suddenly happened), or if they have any other problem at their
   end, or they made any changes to your account, or if there are any limitations/
   restrictions, or if the hosting package is set to Windows and not Linux, etc.–
   There are also many threads on this topic on these forums: [http://wordpress.org/search/Error+establishing+a+database+connection?forums=1](http://wordpress.org/search/Error+establishing+a+database+connection?forums=1)
 *  Thread Starter [Robski](https://wordpress.org/support/users/robski/)
 * (@robski)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/mysql-database-not-connecting/#post-6924434)
 * It might be my host – They recently had a DDoS attack on one of their servers.
 *  Thread Starter [Robski](https://wordpress.org/support/users/robski/)
 * (@robski)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/mysql-database-not-connecting/#post-6924436)
 * Also, I have read all the threads, but to no avail
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/mysql-database-not-connecting/#post-6924441)
 * > It might be my host – They recently had a DDoS attack on one of their servers.
 * have you contacted them ?

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

The topic ‘MySQL Database not connecting’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [not connecting](https://wordpress.org/support/topic-tag/not-connecting/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/mysql-database-not-connecting/#post-6924441)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
