Thank you.
I needed the 'database=' in the statement. I also had to use the hostname rather than the IP address, however this may be a network issue.
My final connection code looks like the following:
my $dsn = "DBI:mysql:database=$db;host=$host";
my $dbh = DBI->connect( $dsn, $user, $pass, { RaiseError => 1 }) or
die ( "Couldn't connect to database: " . DBI->errstr );
In reply to Re^2: Connecting to remote db with DBI
by dana
in thread Connecting to remote db with DBI
by dana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |