Title: &#8216;Can&#8217;t select database&#8217; problem
Last modified: August 19, 2016

---

# ‘Can’t select database’ problem

 *  [Andrew Chapman](https://wordpress.org/support/users/andrew-chapman/)
 * (@andrew-chapman)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/cant-select-database-problem/)
 * Hi,
 * When I visit //mydomain/wp-admin/install.php I get the following error message:
 * > We were able to connect to the database server (which means your username and
   > password is okay) but not able to select the menspray_wp1 database.
   >  * Are you sure it exists?
   >  * Does the user menspray_wp1 have permission to
   > use the menspray_wp1 database? * On some systems the name of your database 
   > is prefixed with your username, so it would be like username_wordpress. Could
   > that be the problem?
 * The third of these is true. I called it wp1 in the control panel, and it has 
   been created as menspray_1. At the moment, DB name and DB user are both menspray_wp1
   in the config file, which is how they appear in the control panel.
 * What should I do?
 * Andrew

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

 *  [alexleonard](https://wordpress.org/support/users/alexleonard/)
 * (@alexleonard)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/cant-select-database-problem/#post-912530)
 * You need to open up your wp-config.php file and adjust the dbname and dbuser.
 * This file should be located at
 * //yourdomain/wp-config.php
 *  Thread Starter [Andrew Chapman](https://wordpress.org/support/users/andrew-chapman/)
 * (@andrew-chapman)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/cant-select-database-problem/#post-912542)
 * Thanks, Alex. I started again with the database (a WordPress blog had been set
   up automatically by the web host, but they put it in mensprayer.net/wordpress,
   whereas I wanted it in root). So I moved the WordPress files into the root directory,
   and kept the same database user names – so they showed up as being there, but
   I think I failed to Add User again.
 * Anyway it’s working now, thank God.
 * Andrew

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

The topic ‘‘Can’t select database’ problem’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 2 participants
 * Last reply from: [Andrew Chapman](https://wordpress.org/support/users/andrew-chapman/)
 * Last activity: [17 years, 6 months ago](https://wordpress.org/support/topic/cant-select-database-problem/#post-912542)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
