Manual reference: http://www.php.net/manual/en/function.mysql-connect.php
resource mysql_connect ( [string server [, string username [, string password [, bool new_link]]]]) Seeing it is not a web page you're connecting to, try removing the "http://". "localhost" has particular meaning within the IP conventions - if cgi.xyz.com is remote then only use that server's name and remove the 'local' designation, ie use the name from your computer's perspective, not the remote computer's perspective. Use PING to ascertain that you have the server's name expressed correctly. The default values are "server = 'localhost:3306' " which may be causing some confusion here. I recommend simplifying by leaving out the port number (3306) for now - MySQL knows that (hopefully) and thus the remote computer's RDBMS should be 'listening' on that port - if it's not, we'll have to get downer-and-dirtier... Let us know how you get on! =dn ----- Original Message ----- From: "Beau Lebens" <[EMAIL PROTECTED]> To: "'Inter-Media Webmaster'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 14 March 2002 00:21 Subject: RE: [PHP-DB] PLEASE HELP !!!!!!! > try an IP > > > // -----Original Message----- > // From: Inter-Media Webmaster [mailto:[EMAIL PROTECTED]] > // Sent: Thursday, 14 March 2002 6:00 AM > // To: [EMAIL PROTECTED] > // Subject: [PHP-DB] PLEASE HELP !!!!!!! > // > // > // PLEASE HELP !!!!!!! > // HOW I CAN GET CONNETCTION TO REMOTE HOST IN OTHER SERVER WITH > // mysql_connect(); > // e.g. > // my php file is in www.abc.com/index.php > // mysql server is localhost on cgi.xyz.com > // > // can i do something like this > // > // mysql_connect("http://cgi.xyz.com:localhost:3306", username, > // password); > // > // PLEASE ANSWER to [EMAIL PROTECTED] > // > // > // > // > // > // -- > // 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 > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php