Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^2: Connecting to remote db with DBI

by dana (Monk)
on Mar 23, 2007 at 21:16 UTC ( #606350=note: print w/replies, xml ) Need Help??

in reply to Re: Connecting to remote db with DBI
in thread Connecting to remote db with DBI

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 );

Replies are listed 'Best First'.
Re^3: Connecting to remote db with DBI
by Anonymous Monk on May 20, 2015 at 21:21 UTC
    Worked the first try !!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://606350]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2023-05-28 15:38 GMT
Find Nodes?
    Voting Booth?

    No recent polls found