WordPress.org

Forums

[resolved] Local Install Database Connection Problem (5 posts)

  1. sheperdydodah
    Member
    Posted 5 years ago #

    I am doing a first time LOCAL install on my laptop for development purposes and have done the "famous 5 min install"

    However when I try and run install.php I get the following error

    "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 DB_HOST. This could mean your host's database server is down".

    I am runnign WAMP and my config file looks like this....

    '/** The name of the database for WordPress */
    define('oldbellwpres', 'putyourdbnamehere');

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

    /** MySQL database password */
    define('', 'yourpasswordhere');

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

    /** 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', '');
    '

    I can see the database oldbellwpres in mysql and have tried localhost:8889 as the connection

    I have never set a password on the databse - so assume its null - but can't find where to change that to something else?

    Any ideas? specifically

    1 - how do I know the database servier is running
    2 - how do I chenge the passoerd on the database
    3 - the magic words to make it work!!

    Cheers

    Sheperdydodah

  2. wordprest
    Member
    Posted 5 years ago #

    try to indicate "root" as username and no password as '' .

  3. If you can see the database, mysql is probably running. But see Setting up a WAMP Server by hand « puremango.co.uk for command line prompts to be sure myqsl is running.

    Different solutions to changing passwords: - PHP, Apache, MySQL, Windows : WampServer.

  4. nabtron
    Member
    Posted 5 years ago #

    @sheperdydodah, your mysql is working fine and the server is setup correctly too. However you have made mistakes while editing the wp-config file settings that you posted above. Please follow this to correct them and every thing will work perfectly

    This is the code that you posted:

    '/** The name of the database for WordPress */
    define('oldbellwpres', 'putyourdbnamehere');

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

    /** MySQL database password */
    define('', 'yourpasswordhere');

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

    /** 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', '');
    '

    simple replace this part of code with the following one and it should work,

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

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

    /** MySQL database password */
    define('DB_PASSWORD', '');

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

    /** 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', '');
    '

    The issue was that while editing the wp-config file, you entered the values in wrong position, have a look at both above, wrong and correct settings and you will get an idea.

  5. sheperdydodah
    Member
    Posted 5 years ago #

    Thanks a lot Nabtron - all up and running sweetly!!!

Topic Closed

This topic has been closed to new replies.

About this Topic