According to the error it looks like you are using the wrong IP Address or the wrong port. Make sure the IP Address is correct and if that dont work try to specify and force connection with the default port 3306. Not sure , but you may have to open another port to support the other connection.
PHP Code:
$link = mysql_connect("$host:3306", "mysql_user", "mysql_password"); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link);
Last edited by developer_nc; 2006-11-26 at 02:48 AM.
The MySQL database you are attempting to connect to, may not allow remote connections. Make sure the user you are attempting to connect as, has a host entry for your host. Or just use a wildcard if you are not worried about security,
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
NuSphere PhpED 5.0
: The Staff of php-editors.com recently spent a few days working with NuSphere
PhpED 5.0
(a popular PHP IDE) and
NuCoder 1.4
(a PHP Encoding Utility), read up on all the details.