Title: Cannot select database
Last modified: August 18, 2016

---

# Cannot select database

 *  [liljoeyjordison](https://wordpress.org/support/users/liljoeyjordison/)
 * (@liljoeyjordison)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/cannot-select-database/)
 * Am getting the following error:
    `Canâ€™t select database`
 * We were able to connect to the database server (which means your username and
   password is okay) but not able to select the thedrybar_-_sql database.
 * But the data in `wp-config.php` is correct, and to prove it i took the `define('
   DB_', '')` lines, and pasted them into a file called `test.php`. This file can
   connect to the database, why can’t the installation?

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

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/cannot-select-database/#post-281333)
 * Because your username is not linked to the db.
    Your website needs to make that
   connection – somewhere there will be an ‘add user to db’ button. Who is your 
   host ?
 *  [x-f](https://wordpress.org/support/users/x-f/)
 * (@x-f)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/cannot-select-database/#post-281338)
 * Umm.. You shouldn’t use hyphens in database and table names. That can cause problems.
   Maybe not in this particular case, however – better without hyphens.
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/cannot-select-database/#post-281341)
 * Hyphens do not matter.
    Ensim databases all have hyphens, usually in the form
 * domainname_-_databasename
 *  Thread Starter [liljoeyjordison](https://wordpress.org/support/users/liljoeyjordison/)
 * (@liljoeyjordison)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/cannot-select-database/#post-281348)
 * Ok, i have this working now- it was a problem with my host… I mailed them and
   they fixed it

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

The topic ‘Cannot select database’ is closed to new replies.

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 4 replies
 * 3 participants
 * Last reply from: [liljoeyjordison](https://wordpress.org/support/users/liljoeyjordison/)
 * Last activity: [20 years, 7 months ago](https://wordpress.org/support/topic/cannot-select-database/#post-281348)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
