The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Error establishing a database connection (5 posts)

  1. toe
    Posted 11 years ago #

    Hi, I need some help configuring the wp-config-sample.php, can anyone show me some examples of a working config, thanks, look forward to hearing a reply.

  2. Nick Momrik
    Posted 11 years ago #

    Well, wp-config-sample.php is an example.

    Specifically which part are you having a problem with?

  3. James Huff
    Support Team Rep.
    Posted 11 years ago #

    Since the Codex is down right now, take a look at this Google cached page:

  4. toe
    Posted 11 years ago #

    Ok, this is now what I tried:

    // ** MySQL settings ** //
    define('DB_NAME', 'website_wordpress'); // The name of the database
    define('DB_USER', ''website_wordpress'); // Your MySQL

    define('DB_PASSWORD', 'pass'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    // Change the

    prefix if you want to have multiple blogs in a single database.
    $table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'

    // Change this to localize

    WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-

    includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');

    /* Stop editing */

    define('ABSPATH', dirname


    And I get this 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 localhost.

    Any ideas?

  5. toe
    Posted 11 years ago #

    [Moderated -- please ask a new question in a new post]

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.