RE: mySQL - can connect with mysqlcc but not PHP code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



do you have the same user with the same permissions as the mysql cc user?

bastien

From: Bryan Green <bcgreen@xxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Subject:  mySQL - can connect with mysqlcc but not PHP code
Date: Fri, 03 Dec 2004 12:52:53 -0800

So here's the problem: I can connect to a mySQL database on localhost just
fine with a PHP test script I've written, but I cannot connect to a remote
server, even though I can connect to the remote server just fine with
mySQL Control Center. Anybody have any suggestions? Here's a snippet of my
code, if it helps:

-------------------------------------------------------
@ $db = mysql_pconnect($myhost, $myuser, $mypass);
if (!$db)
{
       echo "Error: could not connect to DB."; exit;
}
mysql_select_db("test");
echo "Connection established!";
-------------------------------------------------------

And I have verified that the variables $myhost, $myuser, and $mypass
contain the correct connection data.

Thanks a million!
Bryan Green

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux