Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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.


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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2017-11-25 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (355 votes). Check out past polls.

    Notices?