Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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
Replies are listed 'Best First'.
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 avoiding work at the Monastery: (9)
As of 2015-08-31 20:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (364 votes), past polls