Support » Installation » [Resolved] Error establishing a database connection

[Resolved] Error establishing a database connection

  • 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 script, fails with ‘Error establishing a database connection.’

    ## wp-config.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__).’/’);

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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 ?

    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.

    [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)


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

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