[prog] Perl/MySQL on LAN - reach with server
Meryll Larkin
alwanza at oz.net
Mon Dec 2 12:09:40 EST 2002
12/02/02
Hey!!!
I just upgraded from RH 7.2 & RH 7.3 to RedHat 8.0 and
was FINALLY able to get MySQL to work with my Perl-CGI
scripts (I had lots of headaches with 7.2 and 7.3).
Now I have a question about access from other computers
on the same LAN. What I'd ultimately like to do is
have a Perl-CGI Web application (already written & working
on my developer machine) accessible through the Web.
I intend to put the Perl-CGI script on my server, but
I've heard that it is possible to have the database on
a different computer (on the same LAN) and access it
through the script.
I'm not sure how I would be doing this - I currently ssh
through my LAN (and have the hosts set so that it only
accepts ssh from local IP addresses).
1. Is there a security advantage to having the database
on a separate machine than the server?
2. How would I modify my Perl-CGI script to access the
database on a different machine?
I am currently using:
my $DATA_BASE = 'dbi:mysql:Filename';
my $dbh = DBI->connect ($DATA_BASE, $user, $password) ||
$DISPLAY_MOD->print_punch_item ("can\'t connect
to database: $!" . $DATA_BASE->errstr);
Hey, it is PERFECTLY okay to tell me to RTFM, but PLEASE,
point me to the correct "M".
TIA,
Meryll
--
Meryll Larkin
Perl Programmer - Web Developer - Linux Apache Admin
Seattle, WA, USA
More information about the Programming
mailing list