Title: establishing error
Last modified: August 18, 2016

---

# establishing error

 *  [vinamilk](https://wordpress.org/support/users/vinamilk/)
 * (@vinamilk)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/establishing-error/)
 * I have an “Error establishing a database connection” error.
    I setup wordpress,
   mysql,… My databse name,host,user,pass is correct. How can I fix it?

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/establishing-error/#post-350472)
 * _My databse name,host,user,pass is correct._
 * Probably it is not. Otherwise you wouldn’t get the error.
    Is it on a hosted 
   environment or is it hosted by yourself?
 *  [resiny](https://wordpress.org/support/users/resiny/)
 * (@resiny)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/establishing-error/#post-350558)
 * as moshu said, obviously everthing isn’t right.
 * 1. Make sure you added the user to the databse. This is key if you’re using cpanel.
   I spent about an hour fooling around with a wp install until I figured this out
 * 2. Make sure there isn’t an automatic prefix to the table you aren’t adding. 
   if your site is xyz.com, there could be a prefix on a database/user called wordpress
   that would make the database name xyz_wordpress and not just wordpress
 * hope that makes sense

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

The topic ‘establishing error’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 3 participants
 * Last reply from: [resiny](https://wordpress.org/support/users/resiny/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/establishing-error/#post-350558)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
