• I’m probably the 438249329th person to have this problem, but I had the following on my install.php page when I was going through the installation guide:

    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.

    I have called my host several times to verify that everything is correct. One tech guy told me that if I was able to connect to the database through the Primus MyAccount Portal, then the connection of the database is fine, and that my username and password are correct. I even asked at least 3 times concerning the database name, username and MySQL host name. I did reset to a new password, but if I can get to the database using this new password, why is this message still coming up?

    A question on the side:

    In the installation guide, there’s numerous lines of code that they suggested to add to the config.php page. If I didn’t add all of it, does it affect whether or not the error page comes up? I wouldn’t think so, but I’ve never used WordPress before, so I want to make sure.

Viewing 4 replies - 1 through 4 (of 4 total)
  • why is this message still coming up?

    Because WordPress cannot connect to your database. Have you double-checked the database hostname info?

    If I didn’t add all of it, does it affect whether or not the error page comes up?

    What ‘code’ are you referring to?

    Thread Starter m3llow5ky

    (@m3llow5ky)

    I thought this part was the most important? :

    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘putyourdbnamehere’);

    /** MySQL database username */
    define(‘DB_USER’, ‘usernamehere’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘yourpasswordhere’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);

    of which I already checked numerous times to make sure they were right. I don’t know anything about “database hostname info”.

    As for the code, I’m talking about the random keys that need to be generated, as well as other lines of code such as table prefixes, debugging, configuring error logs, etc, etc.

    As for the code, I’m talking about the random keys that need to be generated, as well as other lines of code such as table prefixes, debugging, configuring error logs, etc, etc.

    If you let the install program create the wp-config.php file you will have the keys created.

    as for
    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);

    You will need check with host

    If you using Cpanel then you will need use your username as prefix

    define(‘DB_NAME’, ‘cpanelusername_putyourdbnamehere’);

    Thread Starter m3llow5ky

    (@m3llow5ky)

    which I did. And all the tech guys told me the same thing. “localhost’ is correct.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error Establishing a database connection’ is closed to new replies.