Support » Installing WordPress » Error establishing a database connection

  • Enviro:
    Windows Server 2003 SP1, Apache, PHP 4.3.11, WordPress 1.5 (just downloaded today), MYSQL 4.1.12a.

    Followed instructions to the T.

    In MYSQL when i do show databases; i see the wordpress database. when i do use wordpress; it tells me my current database is wordpress. when i do status; i see the database, the current user, etc.

    However, no matter what i do (I know my wp-config.php is correct) i continue to get the error.

    Any ideas?

    define(‘DB_NAME’, ‘wordpress’); // The name of the database
    define(‘DB_USER’, ‘root’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘password’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

Viewing 4 replies - 1 through 4 (of 4 total)
  • When you say ‘In MYSQL’, do you mean from commandline/shell?
    Did you check permissions on the wp-config.php file?

    Hi Class,

    yes, from the command shell.

    however, since then i’ve installed the mysql administrator and i’ve checked and re-checked schema privileges for the user, schema privileges for the localhost connection, etc.

    from the command shell and the mysql administrator i can login to mysql using the exact same username and password that i specified in the wp-config.php file, etc and yet i continue to get this ‘error establishing a database connection’ message.

    the only other variable is the db_host and i’ve tried every permutation possible incl. localhost,, blog,,, and still nothing.

    any ideas?

    solved, but very hokey…

    ok, i removed php 4.4 and installed php 5.0.4. then in php.ini i uncommented extension=php_mysql.dll and voila.

    <$.02> tinkering is fun for the enthusiast and hobbyist, but to be more mainstream this has got to be more automated. most people don’t have time to tinker</$.02>

    I agree with your $.02 but it’s a PHP issue on windows I guess, not WP’s fault 🙂

    Did you edit the php.ini for your 4.4 install?

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