I have two servers running on redhat and debian. I am using a perl script for taking mysql backups and in redhat it is working fine. When I run it on debian, I get the following error:
Can't locate Mysql.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./dbbackup.pl line 15.
I googled this error and found that I need to install mysql driver for perl. I installed it using this command:
sudo apt-get install libdbd-mysql-perl
The response was as follows:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libdbd-mysql-perl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 189 not upgraded.
Still I am getting the same error. Can someone help me on this? Do I need to restart any other service?
Mysql.pm was the old, pre-DBI interface to MySQL. It’s been obsolete for years, and was dropped entirely from the DBD-mysql dist (a.k.a. libdbd-mysql-perl) in 2006.
You can try to install an old copy, but you’re better off porting the backup script to DBI and DBD::mysql, or finding a newer backup script.