On Sunday 05 January 2003 02:54, Qunfeng Dong wrote:
> Hi, I am sure this is a silly/easy question but I
> really hope someone can point me some documents.
>
> We are currently running PHP and MySQL at the same
> machine. Can I run PHP in one machine and MySQL server
> in another machine? If so, how can I make the database
> connection? Currently, in all my PHP scripts, they
> connect to the database through
>
> @ $db = mysql_pconnect("localhost", "UNAME",
> "PASSWD");
>
> can I just replace localhost with the host name of
> MySQL machine? What else should I worry about?
Basically yes. But you need to tell mysql to allow remote connections
(checkout the GRANT command).
Also if you have a firewall between the two machines you would naturally have
to take that into account.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Cure the disease and kill the patient.
-- Francis Bacon
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php