Mysql on a separate server from webserver

2002-08-29 Thread Nestor

I have written previous websites where I used perl or PHP
to access a Mysql DB wen bith the webserver and the Mysql
db are on the same server.  

My questions is how different is it to access or connect 
to the Mysql database when the database is on a separate 
server(machine)?
Thanks,

Nestor A. Florez
http://www.IneedWork.org  ---My website 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.384 / Virus Database: 216 - Release Date: 8/21/2002


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Mysql on a separate server from webserver

2002-08-29 Thread David Bordas

Hi,

 I have written previous websites where I used perl or PHP
 to access a Mysql DB wen bith the webserver and the Mysql
 db are on the same server.

 My questions is how different is it to access or connect
 to the Mysql database when the database is on a separate
 server(machine)?

Juste modify the DBI args in you .pl file to set IP of the mysql server.
That was 127.0.0.1 or locahost when you are on the same server.

Other thing, verify that -skip-networking is not 'ON' in the mysql config if
you wish to allow network connection ...

David


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Mysql on a separate server from webserver

2002-08-29 Thread Adam Nelson

Something like this:

$site::dbName= 'DBI:mysql:test:10.10.2.20';

for a database called test on 10.10.2.20

Then add the user for the web machine (assuming it's 10.10.2.10) to the
authorized list:

Grant select on test.* to [EMAIL PROTECTED] identified by 'password';
Flush privileges;

Everything else is exactly the same (and I find it works much better and
is obviously more secure).



-Original Message-
From: Nestor [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 29, 2002 3:09 AM
To: [EMAIL PROTECTED]
Subject: Mysql on a separate server from webserver


I have written previous websites where I used perl or PHP
to access a Mysql DB wen bith the webserver and the Mysql
db are on the same server.  

My questions is how different is it to access or connect 
to the Mysql database when the database is on a separate 
server(machine)?
Thanks,

Nestor A. Florez
http://www.IneedWork.org  ---My website 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.384 / Virus Database: 216 - Release Date: 8/21/2002





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php