WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Error establishing a database connection (19 posts)

  1. frankcatsdad
    Member
    Posted 2 years ago #

    Tried just about everything....

    I have an existing WP site I am working on for a client.

    I need to run from a different database.

    Database installed using phpMyAdmin no problems.

    I use the correct DB Name, Username and Password for the new DB in the wp-config file and get an "Error establishing a database connection" error message.

    Switch the info back to the old DB Name, Username and Password and hey presto site is back??????

    Anyone point me in the right direction????

    Martin

  2. Tim S
    Member
    Posted 2 years ago #

    Hi Martin,

    Typically, the error you are getting is due to incorrect values in the config file. I'd make sure you have the user attached to the database, the correct password for the database, and the hostname and database name are also correct.

  3. frankcatsdad
    Member
    Posted 2 years ago #

    Attached User to DB - OK
    Username - OK
    Password - OK
    Host - localhost (same os DB that works)

  4. wpsaranr
    Member
    Posted 2 years ago #

    If all the above are Ok and still getting "Error establishing a database connection", then contact your hosting provider, bcoz this database (which you created) is not working.. that's why you are getting this error...

    [sig moderated as per the Forum Rules]

  5. frankcatsdad
    Member
    Posted 2 years ago #

    Hmmmm!

  6. Tim S
    Member
    Posted 2 years ago #

    wpsaranr is right. If all your settings are correct, it's best to contact your web hosting provider.

  7. jeroarceo1
    Member
    Posted 2 years ago #

    this was helpfull

  8. frankcatsdad
    Member
    Posted 2 years ago #

    Still got the same issue???

  9. Tim S
    Member
    Posted 2 years ago #

    Contact your hosting provider, if you've verified all the settings in the wp-config.php file are correct.

  10. frankcatsdad
    Member
    Posted 2 years ago #

    Its a college and their IT department isn't up to much!!!!

  11. Tim S
    Member
    Posted 2 years ago #

    Whats your URL? I just want to see the error, and see if I can find anything unusual. Have you made sure the user is attached to the database, and the user has ALL privileges assigned?

  12. frankcatsdad
    Member
    Posted 2 years ago #

    Http://www.cardinalnewman.ac.uk

  13. frankcatsdad
    Member
    Posted 2 years ago #

    this is the site at the moment - live

  14. frankcatsdad
    Member
    Posted 2 years ago #

    got that?

  15. Tim S
    Member
    Posted 2 years ago #

    Yeah, whats the URL to your WordPress website?

  16. frankcatsdad
    Member
    Posted 2 years ago #

    This is the site now running the new DB

  17. Tim S
    Member
    Posted 2 years ago #

    So you're not getting a database error?

  18. frankcatsdad
    Member
    Posted 2 years ago #


  19. frankcatsdad
    Member
    Posted 2 years ago #

    not now just a

    Error establishing a database connection

    ????

Topic Closed

This topic has been closed to new replies.

About this Topic