Title: Can’t select database
Last modified: August 18, 2016

---

# Can’t select database

 *  [curleyco](https://wordpress.org/support/users/curleyco/)
 * (@curleyco)
 * [18 years, 12 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/)
 * I see there are a number of people who have written with this error.
 * I’m sure the database exists…and that the wp-config file is correct.
 * I’m also sure the database location for this hosting service is localhost.
 * I’m recreated this same error on 2 different servers…and a friend who knonws 
   databases better than I do is also stumped.
 * I really want to use WordPress…but it seems the only answer to this is “It must
   be some error you’ve made in the database creation or the wp-config file”.
 * This post is a last ditch effort to see if there might be ANY other explanation
   bfore ditching the whole idea of using WordPress.
 * Any thoughts at all?

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 12 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-583742)
 * No, there is no other explanation, sorry.
 * 99.99% is human error: typo in wp-config file, typing in the wrong spot in the
   config file, DB user not added to the database, DB user not having privileges.
 * You may want to give a chance to:
    [http://install4free.wordpress.net/](http://install4free.wordpress.net/)
 *  Thread Starter [curleyco](https://wordpress.org/support/users/curleyco/)
 * (@curleyco)
 * [18 years, 12 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-583747)
 * It’s a commercial site. I’ll find another blogging software.
 * Too bad.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 12 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-583748)
 * _I’m sure the database exists…and that the wp-config file is correct._
 * I’m also sure the database location for this hosting service is localhost.
 * These same words have been written more times than any other single statements
   on these forums — and they are invariably incorrect.
 * G’luck.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 12 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-583756)
 * _These same words have been written more times than any other single statements
   on these forums — and they are invariably incorrect._
 * I wish I had as many thousand dollars as many times this was posted (wrongly)…
   and I could comfortably retire 😉
 *  [gilliancs](https://wordpress.org/support/users/gilliancs/)
 * (@gilliancs)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584232)
 * > _I wish I had as many thousand dollars as many times this was posted (wrongly)…
   > and I could comfortably retire 😉 _
 * This reply is not very much help to the hundreds or thousands (if you are to 
   retire in comfort!) of people who have this problem.
 * Why not give us a few clues? Like:
 * These are some of the things that can go wrong:
 * 1) you made a typing error. Check very carefully that the title of the database
   matches what you typed into the config file and there are no spaces between the
   name and the single qote marks.
 * It should look like this:
 *     ```
       // ** MySQL settings ** //
       define('DB_NAME', 'testsite');    // The name of the database
       define('DB_USER', 'johndoe');     // Your MySQL username
       define('DB_PASSWORD', 'yourpassword'); // ...and password
       define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value
       ```
   
 * 2) you didn’t install a Mysql database before running the wordpress install script(
   if you are using phpMyAdmin you should find it in the list of databases on the
   left of the home screen. Double check it is there.)
 * 2) you didn’t give the database your username. Here’s how to do it. (????)
 * 3) the user doesn’t have the right privileges. Heres’ how to check.(????)
 * 4) you didn’t save the file “wp-config-sample.php” as “wp-config.php”
 * It would be great if moshu or whooami could fill in some of the blanks. . .
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584233)
 * Also note that Step 2 of [Installing_WordPress](http://codex.wordpress.org/Installing_WordPress)
   covers the database and database user creation.
 *  [gilliancs](https://wordpress.org/support/users/gilliancs/)
 * (@gilliancs)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584234)
 * Thanks Michael
 *  [gilliancs](https://wordpress.org/support/users/gilliancs/)
 * (@gilliancs)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584235)
 * [http://codex.wordpress.org/User:harkey/Database_Errors](http://codex.wordpress.org/User:harkey/Database_Errors)
 * Herre’s some more information: it’s not finished yet, but could help
 *  [shadow](https://wordpress.org/support/users/shadow/)
 * (@shadow)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584236)
 * If you would like to email me, I can take a look for you.
 * shadow12 gmail
 *  [gilliancs](https://wordpress.org/support/users/gilliancs/)
 * (@gilliancs)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584237)
 * OK, I solved my problem. Thank you to the moderators for their quick offers of
   help.
 * I had copied a running blog on a remote server to my local machine in order to
   be able to check if 2.3 will run OK with my theme.
 * I backed up the mysql data from the remote server using the backup plugin. I 
   opened phpmyadmin, created a new database and imported the data from the backup.
   So far so good.
 * However, I had not set the permissions for this new database. I was already a
   user with password but I had to make this user/password combination work with
   the new database I had created.
 * For others who may have the same problem, here’s how:
 * In phpMyAdmin, from the Home page, I clicked on ‘privileges’.
    I found my username
   in the list of users and clicked on the pencil icon to edit the privileges.
 * In the first block of possible privileges-global privileges- I selected all then
   deselected ‘GRANT’ and clicked ‘GO’
 * Then in the section below-database specific privileges-I selected the database
   I wanted access to from the dropdown menu and clicked ‘GO’.
 * And it worked!
 * So, yes, this is an example of one of the 99.9% human-errors and moshu’s post
   did give me the clue to what might be the problem–but not how to solve it.
 * To work this out I used Brandon Booth’s installation instructions (www.lucidgreen.
   net) and Chapter 2 ‘Creating a local test environment for your blog’ in the book
   _Blog Design Solutions_ published by Friends of ED.
 *  [eebee](https://wordpress.org/support/users/eebee/)
 * (@eebee)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584240)
 * I am unable to solve this I am sure it is al installed ok because i did it via
   my webhost using fantastico.I have several other blogs all installed in this 
   way and all OK except this latest one. Any idea what can go wrong when installing
   via a host?
 *  [ivovic](https://wordpress.org/support/users/ivovic/)
 * (@ivovic)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584241)
 * if you’re doing it via fantastico, then why not just junk it and do it again?
 * really though, you might be better off “manually” (not so manually) creating 
   the DB in cPanel, and just uploading the version 2.3 files yourself.
 *  [eebee](https://wordpress.org/support/users/eebee/)
 * (@eebee)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584242)
 * I have junked it 3 times but always get the same result ie no result!
 * Yes I will try by doing that way. Didn’t know you could. Thanks
 * When so many people are having a problem it seems very bossy and rude for others
   to say there is “invariably” a fault in the database set up.

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

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 13 replies
 * 8 participants
 * Last reply from: [eebee](https://wordpress.org/support/users/eebee/)
 * Last activity: [18 years, 8 months ago](https://wordpress.org/support/topic/cant-select-database-2-2/#post-584242)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
