MySQL and Perl
I am currently trying to get MySQL working in a Perl script. I have included the DBI library, and I use the code below. When I run the script, I recieve the following error. Any help would be appreciated.
$DB="DBI:mysql:<MY DATABASE>:localhost";
$dbh = DBI->connect($DB,"<MY USERNAME>","<MY PASSWORD>");
-------------------------------------------------------------
Content-type: text/html
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.6.1/i686-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl/5.005 /usr/lib/perl5/site_perl .) at (eval 1) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: ADO, ExampleP, Multiplex, Proxy.
|