0

Hi,

Set up DB, sql file. Looks ok.

Get

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'a2108135'@'localhost' (using password: NO) in /home/a2108135/public_html/connect.php on line 27

Line 26-27

$dblink=MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) or die("Could not connect to database");
    @mysql_select_db("$MySqlDatabase") or die( "Could not select database");

Any help, thanks!!!

L-D

3
Contributors
3
Replies
38
Views
3 Years
Discussion Span
Last Post by L-D
0

Make sure your username is correct, since the warning says "Access denied"

Edited by old_apache

0

Make sure that the username has access from the IP from where you want to connect to the server.

Is localhost your server or a remote one ?

0

Hi and thanks!!

Make sure your username is correct, since the warning says "Access denied"
seems to be ok.

It's localhost.

Make sure that username has access from the IP
I'm cluless.

Well, now I get:
Parse error: syntax error, unexpected T_IF in /home/adven735/public_html/connect.php on line 14

(connect.php note line 14)

<?php

$mysql_host = "localhost";
$mysql_database = "adven735_myblackcat";
$mysql_user = "adven735_mycat";
$mysql_password = "5d(KXU3g,.}H";

x

// do not edit below this line!!     
///////////////////////////////////////////////////////////////////////

    /// Register Gloab Emulation
Line 14>>>   if (!ini_get('register_globals')) {
        $superglobals = array($_SERVER, $_ENV,
                $_FILES, $_COOKIE, $_POST, $_GET);
        if (isset($_SESSION)) {
            array_unshift($superglobals, $_SESSION);
        }
        foreach ($superglobals as $superglobal) {
            extract($superglobal, EXTR_SKIP);
        }
    }



    $dblink=MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) or die("Could not connect to database");
    @mysql_select_db("$MySqlDatabase") or die( "Could not select database");


?>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.