Title: Cannot select database
Last modified: February 20, 2024

---

# Cannot select database

 *  [djmarvin](https://wordpress.org/support/users/djmarvin/)
 * (@djmarvin)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cannot-select-database-6/)
 * Trying to install WordPress on my local computer using WAMPServer. I cannot provide
   a link because the site is on my computer, not on my hosting company’s server.
 * I set up the local folder to contain WordPress files then created the virtual
   host in WAMPServer and set up the database using PHP MyAdmin. When setting up
   the database, I made sure to select “MariaDB rather than MySQL. After doing these
   steps, I went back to WAMP, selected Your virtualhosts –>easylivinghomeservices.
   test and started the WP install.
 * I get the following error:
 * **_Cannot select database The database server could be connected to (which means
   your username and password is okay) but the database could not be selected._**
 * I used the username “root” with no password as I have done in the past. The message
   indicates that doing this is not the issue.
 * I can log into the database through PHP MyAdmin, There isn’t anything there because
   the WP install won’t run. Last time I set up a local WP site, WordPress populated
   the database as part of the install process. Is the process different when using
   MariaDB? I have never used MariaDB before but couldn’t find any information on
   using it as my database when installing WordPress.
 * Again, I made sure to select MariaDB when I added the database in PHP MyAdmin.
 * I have set up local sites many times without a problem. I have always used MySQL
   for the database but am using MariaDB for this site as this is the database that
   is used by the hosting company. (I don’t want to run into issues because I used
   MySQL locally and will have to use MariaDB when the site goes live.)
 * Is the cause of my problem the fact I used PHP MyAdmin instead of something else?

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

 *  [maestro100](https://wordpress.org/support/users/maestro100/)
 * (@maestro100)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cannot-select-database-6/#post-17440858)
 * In my case (after rechecking what was mentioned in marinipavingandmasonry’s answer)
   I found that wp-config.php did not exist. I edited wp-config-sample.php with 
   respect to database, databaseuser, password and hostname and saved it as wp-config.
   php and that made the difference.
 *  [you654](https://wordpress.org/support/users/you654/)
 * (@you654)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/cannot-select-database-6/#post-17941139)
 * Cannot select database
 * The database server could be connected to (which means your username and password
   is okay) but the `wordpress` database could not be selected.
    - Are you sure it exists?
    - Does the user `root` have permission to use the `wordpress` 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?
 * slove this please

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

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

## Tags

 * [cannot](https://wordpress.org/support/topic-tag/cannot/)
 * [install error](https://wordpress.org/support/topic-tag/install-error/)
 * [install wordpress](https://wordpress.org/support/topic-tag/install-wordpress/)
 * [MariaDB](https://wordpress.org/support/topic-tag/mariadb/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 3 replies
 * 4 participants
 * Last reply from: [you654](https://wordpress.org/support/users/you654/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/cannot-select-database-6/#post-17941139)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
