I use NetBeans to run PHP code. The code is used to update a database table on our company's server. So I used the code:
$link = mysql_connect('192.168.X.X:X','X','X');
mysql_select_db('X',$link);
if (!$link) {die('Could not connect: ' . mysql_error());}
echo 'Connected successfully';
mysql_close($link);
but when I click run, this error message is returned:
( ! ) Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '192.168.0.140' (10060) in C:\wamp\www\database\index.php on line 9
( ! ) Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\database\index.php on line 10
Call Stack