Title: Database Problem On Install
Last modified: August 18, 2016

---

# Database Problem On Install

 *  [pg](https://wordpress.org/support/users/dethredic/)
 * (@dethredic)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/)
 * Ok, I just tried installing wordpress, and everything went smoothly until I got
   to the database part. I created a new database and then a user with all privileges,
   but I get the “Error establishing a database connection” error. I am 100% sure
   i have the right values in the php file, as I have tried like 5 times. I have
   even used the same username and database name once, so I had no chance of messing
   that up.
 * Any ideas?

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653485)
 * Most of the time this is wrong information in wp-config.php.
 * Your database server could be down.
 * You database user doesn’t have the correct privileges to the database.
 *  Thread Starter [pg](https://wordpress.org/support/users/dethredic/)
 * (@dethredic)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653516)
 * my database has all privileges.
 * I have wordpress installed, on 1 domain already. This is the second domain I 
   am trying to get working with wordpress. The first domain is up, and I have copied
   the wp-config (except the database/pass/user). I even tried making another user
   within the same database.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653520)
 * Did you ADD the user to the database? Quite often that step is left out…
 *  Thread Starter [pg](https://wordpress.org/support/users/dethredic/)
 * (@dethredic)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653521)
 * Yes I did
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653524)
 * There are 2 error messages… which one do you get?
 *  Thread Starter [pg](https://wordpress.org/support/users/dethredic/)
 * (@dethredic)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653540)
 * WordPress
 * Error establishing a database connection
 * This either means that the username and password information in your wp-config.
   php file is incorrect or we can’t contact the database server at localhost. This
   could mean your host’s database server is down.
 *  * Are you sure you have the correct username and password?
    * Are you sure that
   you have typed the correct hostname? * Are you sure that the database server 
   is running?
 * If you’re unsure what these terms mean you should probably contact your host.
   If you still need help you can always visit the WordPress Support Forums.
 *  Thread Starter [pg](https://wordpress.org/support/users/dethredic/)
 * (@dethredic)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653562)
 * I tried deleting all the files, and re – uploading them, but that doesn’t hlep
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653563)
 * No, deleting files doesn’t help when you have wrong data in the wp-config file.
 * Is this second domain on the same host as the one you succeeded to install?
 *  Thread Starter [pg](https://wordpress.org/support/users/dethredic/)
 * (@dethredic)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653564)
 * yes that is correct
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653565)
 * Well, I am running out of ideas… but I have to tell you that in 99% of the cases,
   despite the user’s insistence on “everything being correct” – it is a human error,
   like typo, wrong quote, lower/uppercase, space between the quote and the info
   etc.
 *  Thread Starter [pg](https://wordpress.org/support/users/dethredic/)
 * (@dethredic)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653566)
 * I wish it was like that. But I feel I have tried so many possibilities that I
   can’t have been wrong all of them.
 * Also a fact to note, as it is a secondary domain, it is located in [http://www.firstdomain.com/www.seconddomain.com](http://www.firstdomain.com/www.seconddomain.com)
 * Could that make a difference?
    firstdomain.com is working seconddomain.com isn’t.
 * I think I will just copy the info from the wp-config from my working one, into
   my non working one, and technically it should have the same posts and stuff right?
 * Also, I haven’t run the install script yet, but I don’t think that should matter
   because it is one of the last steps in the quick 5 min install.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653567)
 * _I think I will just copy the info from the wp-config from my working one, into
   my non working one, and technically it should have the same posts and stuff right?_
 * NEVER DO THAT!
 * but you may try using the same wp-config file if you change the table prefix 
   in it (default is wp_ – make it something else)
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653568)
 * p.s. I don’t know what the secondary domains are, sorry.
    A domain is a domain.
   Period. And I can’t imagine an URL as you posted!
 *  Thread Starter [pg](https://wordpress.org/support/users/dethredic/)
 * (@dethredic)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653574)
 * Well, you can access my site via [http://www.seconddomain.com](http://www.seconddomain.com),
   but the way the file manager is set up, it is in the firstdomain.com

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

The topic ‘Database Problem On Install’ is closed to new replies.

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 14 replies
 * 3 participants
 * Last reply from: [pg](https://wordpress.org/support/users/dethredic/)
 * Last activity: [18 years, 7 months ago](https://wordpress.org/support/topic/database-problem-on-install/#post-653574)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
