Title: Database error
Last modified: August 19, 2016

---

# Database error

 *  [araney](https://wordpress.org/support/users/araney/)
 * (@araney)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/)
 * I’ve been having problems with my WP database for weeks now. I’ve finally got
   nearly everything ironed out, _except_ my site is still not functional. When 
   I put in my wp-admin url, I get:
 * We were able to connect to the database server (which means your username and
   password is okay) but not able to select the ((username)_WordPress database.
 *  * Are you sure it exists?
    * Does the user (username) have permission to use
   the (username)_WordPress database? * On some systems the name of your database
   is prefixed with your username, so it would be like username_ (username)_WordPress.
   Could that be the problem?
 * (and obviously filled in “username” once I pasted the error message here…)
 * Anyway, I have tried all three troubleshooting possibilities listed above, but
   to no avail.
 * Any thoughts or ideas?

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

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1528693)
 * so log into host’s phpmyadmin and verify the database name exactly
 *  Thread Starter [araney](https://wordpress.org/support/users/araney/)
 * (@araney)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1528776)
 * That’s actually where I got the user name and database name, which I plugged 
   into the appropriate fields in the wp-config.php file.
 *  Thread Starter [araney](https://wordpress.org/support/users/araney/)
 * (@araney)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1529004)
 * Is it possible that this is an issue with my host, rather than the WP files in
   my database?
 *  [mrmist](https://wordpress.org/support/users/mrmist/)
 * (@mrmist)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1529005)
 * It’s possible, but it’s more likely that there’s slight problem with the entries
   in your config file. (Especially for this particular error)
 * It’ll be the database name part that is wrong. You need to either add your username
   as a prefix, or remove it if it’s already there.
 * So if your database name field in wp_config is currently
 * username_databasename
    change it to databasename
 * And vice-versa.
 *  Thread Starter [araney](https://wordpress.org/support/users/araney/)
 * (@araney)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1529097)
 * Thanks for the reply.
 * I have tried both of those ways of listing the database name.
 * “We were able to connect to the database server (which means your username and
   password is okay) but not able to select the WordPress database.”
 * I’m at a loss, and am unsure of what the next possible solution could be.
 *  [thisisedie](https://wordpress.org/support/users/thisisedie/)
 * (@thisisedie)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1529098)
 * > not able to select the WordPress database
 * Means the database name is wrong in config. Log in to your cpanel and go to databases
   and find out the exact name of the database.
 *  [maoski](https://wordpress.org/support/users/maoski/)
 * (@maoski)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1529099)
 * sometimes hosts will automatically add extra unique characters to database names
   aswell
 *  [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * (@songdogtech)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1529100)
 * Some installs of phpmyadmin will also show databases that are for configuration
   or otherwise not for wordpress specifically and you may have grabbed the name
   of the wrong DB. And, who is your host?
 *  Thread Starter [araney](https://wordpress.org/support/users/araney/)
 * (@araney)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1529101)
 * Interesting…
 * My host is 3ix.
 * To give you a little back story:
 * My WP blog disappeared entirely. After some investigation, we found that my WP
   database wasn’t THERE anymore. I communicated with my host’s support using live
   chat, told them the db was no longer listed in my cpanel, the support tech said“
   hold on a sec”, et voila! My db was back. Since then, though, I have had no luck
   getting my blog back. I’ve tried various combinations of db names, usernames,
   etc, with no luck.
 * I’ll try all that again though and see if I have any luck!
 *  [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * (@songdogtech)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1529102)
 * Might be that they restored your database but it might not have the same name.
   Check in phpmyadmin again and in the left hand pane, click on what looks like
   a wordpress database and see what tables are in it. Hopefully there are tables
   in it….

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 6 participants
 * Last reply from: [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/database-error-49/#post-1529102)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
