in reply to DBI question

If you look at the DBD::mysql manual page, the section discussing connect has a whole bunch of examples on how to connect to a remote host. The simplest (IMO) is:
$dbh = DBI->connect("DBI:mysql;host=HOST;database=DB;", "user", "passw +ord");