HostOnNet Blog

Cpanel Error – Can’t locate DBD/

Looking for Linux Server Admin or WordPress Expert? We can help.

On restoring a site on new cpanel server, got following error

Error while connecting to MySQL. Failover enacted. install_driver(mysql) failed: Can’t locate DBD/ in @INC(@INC contains: /usr/lib/perl5/ 5.8.7/ i686-linux/usr/lib/perl5/ 5.8.7 /usr/lib/perl5/ site_perl/ 5.8.7/i686-linux /usr/lib/perl5/ site_perl/5.8.7 / usr/lib/perl5/site_perl/ 5.8.5 /usr/lib/perl5/site_perl/ 5.8.4/usr/lib/perl5/site_perl/ 5.8.3 /usr/lib/perl5 /site_perl/5.8.2 /usr/lib/perl5/ site_perl/5.8.1 /usr/lib/perl5/ site_perl/5.8.0 /usr/lib/perl5/ site_perl ./scripts /scripts /scripts /scripts /scripts/scripts /scripts /scripts) at (eval 32) line 3.Perhaps the DBD::mysql perl module hasn’tbeen fully installed,

The problem is due to Perl module DBD::mysql mising.

This can be downloaded from

To install it, unzip it, then cd to the source folder, then run

# perl
# make
# make install

Or you can do it with cpan command

# perl -MCPAN -e shell
cpan> install Bundle::DBD::mysql
cpan> install Bundle::DBI

cpan> exit

Or with

# perl -MCPAN -e ‘force install DBD::mysql’

Recent version of new cpanel server have many Perl related errors, this can be fixed by reinstalling perl from Cpanel site. Installation is easy, just download perl from

Then unzip it

# tar -zxvf perl587installer.tar.gz

Change to the folder and follow the instructions in INSTALL file.

Posted in Uncategorized. Bookmark the permalink.

4 Responses to Cpanel Error – Can’t locate DBD/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.