Support » Localhost Installs » Error connecting to DB

  • WordPress will not connect to my database yet everything looks good (DB name, admin logon and pwd are same in wp-config as in the DB).
    I wrote a TestConnect.php script as follows:

    $link = mysql_connect('localhost', 'mpeneucd_wp476', '2S.PKbb60.');
    if (!$link) {
    die('Could not connect: ' . mysql_error());
    echo 'Connected successfully';

    When I run it from http:\\localhost\TestConnect.php I have no problem connecting to database. However when I run it from http:\\localhost\wordpressTestConnect.php I get the error

    Error establishing a database connection

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error connecting to DB’ is closed to new replies.