WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. superchew
    Member
    Posted 2 years ago #

    When I typed out the information, and click "Submit", what I get is a blank white screen, when I reload the page, it shows:
    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 . 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.

    Try Again

    __
    Can Anyone help me quick? Please.

  2. When I typed out the information, and click "Submit", what I get is a blank white screen,

    Where exactly do you see this? In the WordPress installer? Or some sort of control panel at your web host? Did you set up a database at your webhost?

  3. superchew
    Member
    Posted 2 years ago #

    Its okay now, Just solved it.

  4. Tara
    Member
    Posted 2 years ago #

    Just solved it.

    How? Do you mind sharing?

  5. superchew
    Member
    Posted 2 years ago #

    I use manual configuration of the wp-config file. Changing the different values manually, I do not know why the wordpress auto-config will not work.

  6. thbotany
    Member
    Posted 2 years ago #

    My installation runs fine, using the database info in wp-config.php. To me this means that the DB_NAME, DB_USER, etc. info in wp-config.php is good, and the error is somewhere else.

    An off-the-wall guess - there is no mail server on the server where my wordpress resides. Could it be trying to send an e-mail and failing, then giving the wrong error message?

  7. chill986
    Member
    Posted 2 years ago #

    I'm having a similar problem with rackspace - created the database/userid, and can access it directly with sql commands in a php file, but wordpress is saying either wrong userid/pw or wrong localhost name. I've tried everything I can think of... any ideas?

  8. techbrij
    Member
    Posted 2 years ago #

    See step by step guide to fix Error establishing a database connection . It might help you.

  9. mario0
    Member
    Posted 2 years ago #

    hopefully not picking up the thread too tangentially or too late ...

    I went to the link above, made the php file

    1. First, Make sure, MySql is running. Open PhpMyAdmin and connect the database.
    2. Check User has sufficient permission to connect database. For this, Create a test page say testconnection.php, put following code and run it.

    <?php
    $link = mysql_connect('localhost', 'root', 'password');
    if (!$link) {
    die('Could not connect: ' . mysql_error());
    }
    echo 'Connected successfully';
    mysql_close($link);
    ?>

    and get this message:
    Could not connect: Access denied for user 'root'@'localhost' (using password: YES)

    I am totally lost as what to do.

    thanks so much

  10. matgasnier
    Member
    Posted 2 years ago #

    Guys I have the same issue and get the message "Error establishing a database connection" but I'm not a whiz kid in coding.
    How do you do this:
    "Open PhpMyAdmin and connect the database"
    What does that mean??
    Thank you very much for your help
    Matt

  11. sachinum
    Member
    Posted 2 years ago #

    Hello,

    Thanks for the testconnection.php

    I get 'Connected successfully' but still the 'Error establishing a database connection' is persistent.

    The parameters in wp-config.php are correctly set. Please Help.

  12. trykenter
    Member
    Posted 2 years ago #

    One of the most remarkable methods to check data base is within phpMyAdmin, but I use an awesome plug-in called "WP DataBase Backup".

    Regards!!

    [link removed]

  13. sachinum
    Member
    Posted 2 years ago #

    Problem Solved.

    Since I was able to connect to the database with testconnection.php script above, it was certain that the problem is with wp-config.php file.

    Changed wp-config.php database-user setting to root-user, WP started. Then reverted back to the database-user setting, WP started.

    I could not figure-out what was wrong but concluded that it should have been a typo, if you are in a same situation check and recheck the wp-config.php and or try changing different user.

    Thank you all.

Topic Closed

This topic has been closed to new replies.

About this Topic