WordPress.org

Forums

Error establishing a database connection (5 posts)

  1. toe
    Member
    Posted 10 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
    Member
    Posted 10 years ago #

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

    Specifically which part are you having a problem with?

  3. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    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

  4. toe
    Member
    Posted 10 years ago #

    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?

  5. toe
    Member
    Posted 10 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

Tags

No tags yet.