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

---

# Error establishing a database connection wordpress

 *  Resolved [Nathan](https://wordpress.org/support/users/nathankandouw/)
 * (@nathankandouw)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-wordpress/)
 * Hi everyone,
 * I was in the cPanel of wordpress trying to set up the users when I accidentally
   changed the DB_USER and the DB_PASSWORD. Now every time I try to go into /wp-
   login.php I run into the error: “Error establishing a database connection wordpress”.
   Now this wouldn’t be too much of a problem except for the fact that I didn’t 
   back it up. (I know that was really dumb of me)
 * How can I fix it? Is there a way for me to find the original DB_USER and DB_PASSWORD?

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

 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-wordpress/#post-5534927)
 * > I was in the cPanel…changed the DB_USER and the DB_PASSWORD…
   > Is there a way for me to find the original DB_USER and DB_PASSWORD
 * Go to cPanel and make a new MySQL User and Password, then assign that user to
   your database and write all that info into wp-config.php and you should be good-
   to-go!
 *  Thread Starter [Nathan](https://wordpress.org/support/users/nathankandouw/)
 * (@nathankandouw)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-wordpress/#post-5535056)
 * That fixed it. Thank you for the help!

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

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

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Nathan](https://wordpress.org/support/users/nathankandouw/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-wordpress/#post-5535056)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
