Forums

[resolved] Error establishing a database connection - help (3 posts)

  1. feliciaforbes
    Member
    Posted 2 years ago #

    Help please. I know I have done everything correctly and by the book installing xampplite first and then wordpress. But I have a problem trying to get to http://localhost/wordpress/wp-admin/install.php where it keeps saying I have a database connection problem. What can I do apart from uninstalling and reinstalling again....
    cheers

  2. BPartch
    Member
    Posted 2 years ago #

    If you have a db connection problem then something is amiss.

    Make sure that the db user you created has "all" privileges
    Make sure you have entered the right info into wp-config.php
    Then make sure all files are uploaded to the correct directory on the server
    Then make sure you are browsing to the right path to the install.php file.

  3. feliciaforbes
    Member
    Posted 2 years ago #

    Hi again...

    OK, I have checked that the db user has all privileges and it does;
    The correct info is in wp-config.php, the info being:

    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress'); (correct)

    /** MySQL database username */
    define('DB_USER', 'root'); (correct)

    /** MySQL database password */
    define('DB_PASSWORD', 'yourpasswordhere'); (don't have one)

    /** MySQL hostname */
    define('DB_HOST', 'localhost'); (correct)

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    Then make sure all files are uploaded to the correct directory on the server. They are all sitting on C:\xampplite\htdocs\wordpress. So I believe that this is correct.

    Then make sure you are browsing to the right path to the install.php file.
    Well, I think I am. The path to install.php is here:
    C:\xampplite\htdocs\wordpress\wp-admin\install.php

    and here through localhost:
    http://localhost/wordpress/wp-admin/install.php, but this is where the WordPress error shows up saying that "Error establishing a database connection".

    Question: where can I test that that database base is running correctly through the phpadmin? I have clicked on the xampplite control panel and it says that it is running there.

Topic Closed

This topic has been closed to new replies.

About this Topic