Title: Database Error
Last modified: August 19, 2016

---

# Database Error

 *  Resolved [driftingfocus](https://wordpress.org/support/users/driftingfocus/)
 * (@driftingfocus)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/database-error-31/)
 * I keep getting a database error when I go to my admin page. It says:
 * 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.
 * Sometimes I can access it, but only for a couple minutes, and then it goes down
   again. My blog is hosted by a friend, and she says that it seems that whenever
   I change something on the blog (try to make a new post, etc), the mySQL database
   goes down, and she has to set it back up again. Any idea what might be going 
   on? This happened spontaneously, overnight, with no changes in-between.

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

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/database-error-31/#post-1000929)
 * you could have a table(s) crashing on the db
    run a repair on all tables and 
   see if that fixes it
 *  Thread Starter [driftingfocus](https://wordpress.org/support/users/driftingfocus/)
 * (@driftingfocus)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/database-error-31/#post-1000953)
 * How do I do that?
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/database-error-31/#post-1000955)
 * with your host’s phpmyadmin
    once you login to it – just check the box beside
   the tables and at bottom is a dropdown box – select “repair”

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

The topic ‘Database Error’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Samuel B](https://wordpress.org/support/users/samboll/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/database-error-31/#post-1000955)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
