Perl: the Markov chain saw | |
PerlMonks |
Re: Re: Weird Problem with DBIby PsychoSpunk (Hermit) |
on Jul 03, 2001 at 21:16 UTC ( [id://93587]=note: print w/replies, xml ) | Need Help?? |
perldoc DBD::mysql
That being said, your DSN passed to connect isn't properly configured. DBD::mysql requires a different syntax in the connect statement requiring hostname and database instead of simply naming the database you wish to use. Assuming the mysql-server is on the same box as the script, try: $dbh = DBI->connect("dbi:mysql:database=test;hostname=localhost", "username", "password", {RaiseError => 1}); The RaiseError is just good use of available attributes of the DBI. Read perldoc DBI for more and what they do. ALL HAIL BRAK!!!
In Section
Seekers of Perl Wisdom
|
|