Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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.

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]
[erix]: nice cover with the spitting image of George (and a great solo by Prince at the end )
[Discipulus]: good night monks! i feel fresh as the turkey in the hoven but i need to sleep
[planetscape]: gobble, gobble, Discipulus!
[erix]: Discipulus: buonanotte! :)
[stonecolddevin]: man we need a new guitar legend
[stonecolddevin]: Clapton has issues playing nowadays
[stonecolddevin]: Prince is gone
[stonecolddevin]: Van Halen is still around but I haven't heard any of their new stuff
[erix]: oh, 41M views -- everyone has seen it already then :)
[erix]: Alvin Lee dead too -- we're stuck with Karl, I'm afraid :)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2017-06-22 21:22 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (531 votes). Check out past polls.