WordPress.org

Support

Support » Installation » Error establishing a database connection

Error establishing a database connection

  • 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Well, wp-config-sample.php is an example.

    Specifically which part are you having a problem with?

    Moderator James Huff

    @macmanx

    Since the Codex is down right now, take a look at this Google cached page:
    http://64.233.187.104/search?q=cache:gT7-jQHoA0YJ:codex.wordpress.org/Editing_wp-config.php+codex+wp-config&hl=en

    Ok, this is now what I tried:

    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘website_wordpress’); // The name of the database
    define(‘DB_USER’, ”website_wordpress’); // Your MySQL

    username
    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

    (__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.php’);
    ?>

    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?

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

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