develooper Front page | perl.beginners | Postings from March 2002

Re: connecting to mysql database ?

Thread Previous | Thread Next
From:
William.Ampeh
Date:
March 5, 2002 05:55
Subject:
Re: connecting to mysql database ?
Message ID:
OFC841E7F4.33DAECAD-ON85256B73.004BCD7D@frb.gov

my $dbh = DBI->connect ( "DBD:mysql :database=perl
:host=localhost",$username,$password)
                          ^^^
                           |
        should read     DBI::mysql



The syntax is:

$dbh = DBI->connect(DBI:driver_name:database=database_name, username,
password)


The default host is localhost, so host=localhost is redundant.


__________________

William Ampeh (x3939)
Federal Reserve Board


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About