Title: Database connection error &#8212; but I&#8217;ve checked everything
Last modified: August 18, 2016

---

# Database connection error — but I’ve checked everything

 *  [iconmaster](https://wordpress.org/support/users/iconmaster/)
 * (@iconmaster)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/database-connection-error-but-ive-checked-everything/)
 * I created a databse and a user, and assigned the user to the database. I’ve checked
   several times to make sure the config file has the right info.
 * I actually ran the database test script [found here](http://wordpress.org/support/topic/98394?replies=18)
   using the same info (including the vanilla “localhost”) in my config file and..
   it connects fine.
 * I even have another MySQL db running on the same server handling a forum — this
   is working fine.
 * I’m stuck. What can I try next?

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/database-connection-error-but-ive-checked-everything/#post-547865)
 * If you are sure everything is correct, then try changing the database user’s 
   password and updating wp-config.php with that information.
 * Yesterday someone had a problem where they were allowed to do [phpMyAdmin](http://codex.wordpress.org/phpMyAdmin)
   on their database but when they looked further, the user specified in wp-config.
   php had mysteriously dissappeared.
 *  Thread Starter [iconmaster](https://wordpress.org/support/users/iconmaster/)
 * (@iconmaster)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/database-connection-error-but-ive-checked-everything/#post-548027)
 * I figured it out. In the config file, I was customizing the first value instead
   of the second. So in
 * define(‘DB_NAME’, ‘wordpress’);
 * I was changing ‘DB_NAME’ and leaving ‘wordpress’ alone. Whupz.
 * Thanks for looking.

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

The topic ‘Database connection error — but I’ve checked everything’ is closed to
new replies.

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 2 participants
 * Last reply from: [iconmaster](https://wordpress.org/support/users/iconmaster/)
 * Last activity: [19 years, 2 months ago](https://wordpress.org/support/topic/database-connection-error-but-ive-checked-everything/#post-548027)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
