Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How to connect to MySQL on pair.com

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 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.



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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2015-04-27 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (510 votes), past polls