Title: can&#8217;t contact database server
Last modified: August 19, 2016

---

# can’t contact database server

 *  Resolved [apathic](https://wordpress.org/support/users/apathic/)
 * (@apathic)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/)
 * This is my first time trying to install WordPress, so I can’t say I’m surprised
   it’s not going smoothly.
    I’m stuck at the very start of the installation: [http://mywebsite.com/wp-admin/install.php](http://mywebsite.com/wp-admin/install.php)
 * The message I see reads:
 * “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 localhost. This could mean your host’s database
   server is down.”
 * The username and password are fine. I’ve checked literally hundreds of times.
 * I tried writing both “localhost” and the actual IP as the hostname (not at the
   same time, of course). Neither work. Is there something else I should try here?
   
   Is there another reason for WordPress to not be able to contact the server?
 * Please help. I’m a total newb 🙁

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

 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193453)
 * Your web host should provide you with the correct login information. It should
   be as simple as filling in the data. Maybe there is a typo in there somewhere.
   If you edited wp-config with a word processor like MSWord there might be a hidden
   control character, but that usually results in a different error. You are sure
   you have a MySQL server, right? Not MSSQL or some other variant?
 *  Thread Starter [apathic](https://wordpress.org/support/users/apathic/)
 * (@apathic)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193490)
 * Thanks for the reply apljdi!
 * There is no tyop (I’ve checked a hundred times). I also didn’t meddle with the
   file and changed things recklessly.
    I didn’t edit it in Word. I used notepad.
   My database is indeed MySQL (I actually had to check it just now to make sure,
   though. ha ha I’m so clueless).
 * Why does WordPress hate me so?
 *  [figaro](https://wordpress.org/support/users/figaro/)
 * (@figaro)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193492)
 * See the following video for how to troubleshoot that error.
 * [link moderated]
 *  [Kailash](https://wordpress.org/support/users/kailash1/)
 * (@kailash1)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193494)
 * Make sure that the database user has all required privileges to perform operation(
   insert, delete, modify etc.) on database. If all your MySQL settings are correct
   then I suggest you to contact your host regarding this matter. They will be in
   better position to assist you further in this regard.
 *  Thread Starter [apathic](https://wordpress.org/support/users/apathic/)
 * (@apathic)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193508)
 * **figaro** – After watching the video I checked database/user/password/host again
   to make sure. They’re all fine. I guess that’s not the problem, then.
 * **Kailash1** – How do I give my user privileges? The only options I have are 
   to delete a user or to match a user with a database.
    I stumbled upon a tutorial
   that mentioned doing that with phpMyAdmin so I tried that myself, but I don’t
   have “privileges” in there. I just don’t. Also, the database looks completely
   blank. I mean, there are no tables at all. It’s empty. Is that bad?
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193513)
 * > How do I give my user privileges?
 * You might not be able to. Your web host could give your user those privileges
   though, and it sounds like they need to.
 * When you say you can ‘match a user with a database’ what database can you match
   the user to? And have you done so? It may be that you need to connect your user
   with the DB assigned to you, for some odd reason. If that doesn’t work, this 
   is definitely something that you need to contact your host about. Based on your
   description, it sounds like you have a database that is effectively unusable 
   due to the privileges given your user.
 *  Thread Starter [apathic](https://wordpress.org/support/users/apathic/)
 * (@apathic)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193594)
 * The database and user I created are connected.
 * The problem is the privileges, then?
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193595)
 * Based on this conversation, yes, it looks like the problem _might_ be the user
   privileges. WP needs to create about about ten tables and then of course, it 
   needs to be able to edit them. I’m not sure your MySQL user has that ability.
   However, if you are still getting a ‘cannot _connect_‘ error, that might point
   to an even more fundamental problem than privileges. Either way, it looks like
   your web-host is going to have to sort this out for you. Contact your host’s 
   support people.
 *  Thread Starter [apathic](https://wordpress.org/support/users/apathic/)
 * (@apathic)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193596)
 * I’ll do that right away.
    Thanks!

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

The topic ‘can’t contact database server’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [server](https://wordpress.org/support/topic-tag/server/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 9 replies
 * 4 participants
 * Last reply from: [apathic](https://wordpress.org/support/users/apathic/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/cant-contact-database-server/#post-1193596)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
