WordPress.org

Forums

[resolved] Error establishing a database connection (5 posts)

  1. martinlt
    Member
    Posted 9 years ago #

    First time setup, using MySql 4.1.15 and PHP 4.4.1.

    Created a new database, granted all to the user, can login fine from the command line using mysql. When running the http://192.168.1.2/wp-admin/install.php script, fails with 'Error establishing a database connection.'

    ## wp-config.php
    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'wordpress'); // Your MySQL username
    define('DB_PASSWORD', 'XXXXX'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

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

    /* That's all, stop editing! Happy blogging. */

    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'wordpress'); // Your MySQL username

    They really correct ?

    I have XXX'd your password.

    And you have apache running / What OS / wamp / lamp package ?

  3. martinlt
    Member
    Posted 9 years ago #

    Yeah, the dbname and username are the same. I'm setting this up on my own server running Fedora Core 4. Apache version is 1.3.29.

  4. martinlt
    Member
    Posted 9 years ago #

    [root@localhost ~]# mysql -uwordpress -pXXXXXX --host=localhost wordpress
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 2783 to server version: 4.1.15-standard

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> show tables;
    Empty set (0.00 sec)

    mysql>

  5. martinlt
    Member
    Posted 9 years ago #

    All fixed. Needed to update the mysql user password using the old_password() function. Done and all working (bar having to update apache's config to look fo index.php as directory index files).

Topic Closed

This topic has been closed to new replies.

About this Topic