[PHP-DB] Connect to MySql DB on diferent domain
Hi, Im using PHP 4.0 and MySQL and I have a PHP procedure on one site that need to connect to a MySql database outside this domain, I need to append records in a database on a different domain. How can I do this? I will apreciate if anyone give me some help or a simple example how to do this? Thanks Manuel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Connect to MySql DB on diferent domain
instead up supplying 'localhost' in your mysql_connect() function just use the full name of the server i.e mysql_connect(www.domain.com $user, $pass) you must ensure the port is open through the firewall, if applicable, and that you have a user set up with that can access it from another domain. hope this helps. jd M. Couto manuel.couto@ To: [EMAIL PROTECTED] renova.pt cc: Subject: [PHP-DB] Connect to MySql DB on diferent domain 07/25/2002 07:25 AM Hi, Im using PHP 4.0 and MySQL and I have a PHP procedure on one site that need to connect to a MySql database outside this domain, I need to append records in a database on a different domain. How can I do this? I will apreciate if anyone give me some help or a simple example how to do this? Thanks Manuel -- 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
Re: [PHP-DB] Connect to MySql DB on diferent domain
first, get a user account on that DB outside your domain. then when making the connections, just use that on the mysql_connection () function... should be no different that using LOCALHOST... the trick is the user account with the appropriate (and should be limited) rights... M. Couto wrote: Hi, Im using PHP 4.0 and MySQL and I have a PHP procedure on one site that need to connect to a MySql database outside this domain, I need to append records in a database on a different domain. How can I do this? I will apreciate if anyone give me some help or a simple example how to do this? -- Leo G. Divinagracia III [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php