Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: How to connect to MySQL on

by sh1tn (Priest)
on Sep 15, 2005 at 23:26 UTC ( #492462=note: print w/ replies, xml ) Need Help??

in reply to How to connect to MySQL on

my $hostname = ''; 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.

Comment on Re: How to connect to MySQL on
Select or Download Code
Replies are listed 'Best First'.
Re^2: How to connect to MySQL on
by chas (Priest) on Sep 16, 2005 at 00:23 UTC
    (But s/hostname/host/ in first line?)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-11-27 03:16 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (715 votes), past polls