script below is an example of how you may connect to a MySQL database
using Perl. You may also use it to test connectivity to your database.
Remember to substitute your own information as necessary, for your
particular database configuration. The $DBHost
variable MUST remain as stated at this point in time in order to
connect to the MySQL server.
This script requires permissions of: 755.
my $DBName = "(your database name)";
my $DBUser = "(your database user
my $DBPass = "(your database password)";
my $DBHost = "mysql.addr.com";
my $dsn = "DBI:mysql:$DBName;$DBHost";
my $dbh = DBI->connect($dsn, $DBUser, $DBPass);
if ( !defined $dbh )
print "\nDatabase connectionfailed\n\n";
print "\nConnection to mySQL database successful.\n\n";