in reply to Connecting to remote db with DBI
It looks like you're making a mistake when building the DSN: constrast yours ("DBI:mysql:$db;host=$host") and the one provided in the documentation of DBD::mysql:
use DBI; $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
You're missing the "database=" before $db.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Connecting to remote db with DBI
by dana (Monk) on Mar 23, 2007 at 21:16 UTC | |
by Anonymous Monk on May 20, 2015 at 21:21 UTC |
In Section
Seekers of Perl Wisdom