Title: Error establishing a database connection
Last modified: August 19, 2016

---

# Error establishing a database connection

 *  Resolved [urbanred](https://wordpress.org/support/users/urbanred/)
 * (@urbanred)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-145/)
 * I’m flummoxed. I can create a database through cpanel, I can log into the same
   database through the phpMyAdmin, username, password and hostname are all correct.
   Why am I still getting a connection error? What am I missing?
 * Thanks in advance,
    UR

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

 *  [Kailash](https://wordpress.org/support/users/kailash1/)
 * (@kailash1)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-145/#post-1187904)
 * Did you assign the privileges to mysql database user from cPanel? If you have
   assigned mysql user and all privileges are assigned to your database but still
   receiving the connection error then I suggest to contact your host.
 *  Thread Starter [urbanred](https://wordpress.org/support/users/urbanred/)
 * (@urbanred)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-145/#post-1187905)
 * Did that and have contacted the host… just waiting for a more in depth reply 
   from them. They’re first response was a generic ‘Nothing wrong on our end, but
   we’ll take a look’. I may have caught some admin monkey on his coffee break.
 *  Thread Starter [urbanred](https://wordpress.org/support/users/urbanred/)
 * (@urbanred)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-145/#post-1187908)
 * weird. I just created a new username and password with the same credentials for
   the same db and it worked. I don’t get it.
 *  [quantumdani](https://wordpress.org/support/users/quantumdani/)
 * (@quantumdani)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-145/#post-1188127)
 * I had the same experience as urbanred in the end. I don’t know why, but I definitely
   recommend trying it.

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

The topic ‘Error establishing a database connection’ is closed to new replies.

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 4 replies
 * 3 participants
 * Last reply from: [quantumdani](https://wordpress.org/support/users/quantumdani/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-145/#post-1188127)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
