WordPress.org

Forums

[resolved] Error establishing a database connection - problems with my wp-config.php item? (5 posts)

  1. amplifyinteractive
    Member
    Posted 7 years ago #

    Hello,

    So I've been having some trouble installing the newest version of WordPress. Did some research into the problem and I can't seem to find out exactly why I'm getting this error.

    What is happening is when I install wordpress (after configuring the wp-config.php) file, I go to the URL to install and I get the "Error establishing a database connection" error page. So this could mean one of two things: the database I set up is down or the details I edited in the file are incorrect. The database IS up and I confirmed it up and running with my web host. So this leaves the wp-config file....

    Here are some details to clue you all in as to how I might be doing it incorrectly (using Dotster if anyone has any hands-on info). I'm "x"ing out some of the info for security reasons:

    Datebase name: db100xxxx_wordpress
    Username: u100xxxx_user
    Pass: xxxxxx

    So I've tried different combinations - using "wordpress" as the database name for the file, using just the db100xxxx "number" for the database, etc. and I keep on getting the error.

    Any help or advice? I've installed several wordpress blogs but I've never come across this sort of error. Thanks!

  2. oriecat
    Member
    Posted 7 years ago #

    You might also check with the host on whether it needs to show as localhost or not. It does by default, but our host just changed us to a new platform and now it has to show something else there.

  3. obscure
    Member
    Posted 7 years ago #

    The most common mistakes are:

    1. Adding an extra blank space before after the User name or DB name or password

    define('DB_NAME', 'myDBname'); Correct define('DB_NAME', ' myDBname'); Incorrect

    2. Missing the ' before after the User name, DB name or password

    define('DB_NAME', 'myDBname'); Correct define('DB_NAME', myDBname); Incorrect

    3. Having 'Localhost" as the DB host when your ISP actually uses a separate DB hosting server. You may need to double check this with your host.

  4. moshu
    Member
    Posted 7 years ago #

  5. amplifyinteractive
    Member
    Posted 7 years ago #

    THANK YOU for the help - finally got it installed correctly. Thanks to oriecat, obscure & moshu - the specific link that helped me out was: http://wordpress.org/support/topic/150196

Topic Closed

This topic has been closed to new replies.

About this Topic