WordPress.org

Ready to get started?Download WordPress

Forums

Database Problem On Install (15 posts)

  1. Dethredic
    Member
    Posted 6 years ago #

    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?

  2. MichaelH
    Member
    Posted 6 years ago #

    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.

  3. Dethredic
    Member
    Posted 6 years ago #

    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.

  4. moshu
    Member
    Posted 6 years ago #

    Did you ADD the user to the database? Quite often that step is left out...

  5. Dethredic
    Member
    Posted 6 years ago #

    Yes I did

  6. moshu
    Member
    Posted 6 years ago #

    There are 2 error messages... which one do you get?

  7. Dethredic
    Member
    Posted 6 years ago #

    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.

  8. Dethredic
    Member
    Posted 6 years ago #

    I tried deleting all the files, and re - uploading them, but that doesn't hlep

  9. moshu
    Member
    Posted 6 years ago #

    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?

  10. Dethredic
    Member
    Posted 6 years ago #

    yes that is correct

  11. moshu
    Member
    Posted 6 years ago #

    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.

  12. Dethredic
    Member
    Posted 6 years ago #

    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

    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.

  13. moshu
    Member
    Posted 6 years ago #

    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)

  14. moshu
    Member
    Posted 6 years ago #

    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!

  15. Dethredic
    Member
    Posted 6 years ago #

    Well, you can access my site via http://www.seconddomain.com, but the way the file manager is set up, it is in the firstdomain.com

Topic Closed

This topic has been closed to new replies.

About this Topic