Red Hat Bugzilla – Bug 444558
In perl, 'use Mysql;' fails with "Can't locate Mysql.pm in @INC"
Last modified: 2008-05-22 10:00:08 EDT
Description of problem:
Perl scripts that include 'use Mysql;' fail
Version-Release number of selected component (if applicable):
Easy to reproduce
Steps to Reproduce:
1. perl -e "use Mysql;"
Can't locate Mysql.pm in @INC (@INC contains:
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
No errors. The syntax above has worked with every version of Redhat/Fedora from
Additional info: This bug is also in Fedora 8 as bug # 444556
However it is NOT present in Fedora 7. My current work-around for this problem
is to compile perl-DBD-MySQL-3.0007-1 from Fedora 7 and install it instead.
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
There was change in code befoer 10 years. It looks like you need 'use
DBD::mysql;' instead of 'use Mysql;'.
"As of March 1998, the Msql and Mysql modules are obsoleted by the DBI drivers
DBD::mSQL and DBD::mysql, respectively. You are strongly encouraged to implement
new code with the DBI drivers. In fact, Msql and Mysql are currently implemented
as emulations on top of the DBI drivers."
*** Bug 444556 has been marked as a duplicate of this bug. ***