http://www.perlmonks.org?node_id=492462


in reply to How to connect to MySQL on pair.com

my $hostname = 'db71b.pair.com'; my $dbase = '111'; my $mysql_user = '222'; my $mysql_pass = '333'; my $dbh = DBI->connect( "DBI:mysql:$dbase:$hostname", $mysql_user, $mysql_pass, { RaiseError => 1, AutoCommit => 0 } ) || die "DB connection failed: $DBI::errstr\n"; # DB connection is successful if we are here ...
Update: fixed wrong usage of $host/$hostname.