CantlocateDBI. pmin @ INC (@ INCcontains: couldn't locate DBI. 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/usr/local/webserver/mysql/bin/mysqlhotcopy line 8.
BEGIN failed -- compilation aborted at/usr/local/mysql/bin/mysqlhotcopy line 8.
Error cause: the DBI component is not installed as per the system.
DBI (Database Interface) is the Interface for perl to connect to the Database. It is the best way for perl to connect to the database. It supports
Orcal, Sybase, mysql, db2, and other databases
Solution:
The Code is as follows: |
|
Apt-get install libclass-dbi-mysql-perl
|
This method is applicable to debian, ubuntu, and centos. You can use yum instead.
For Redhat/CentOS,
Execute Command
The Code is as follows: |
|
01. yum install perl-DBI perl-DBD-MySQL-y |
For stool, Ubuntu,
Execute Command
01. apt-get perl-DBI perl-DBD-MySQL
Solution 2
Install dbi
Check dbi
SQL code
The Code is as follows: |
|
1. rpm-qa | grep perl-DBD | grep MySQL Rpm-qa | grep perl-DBD | grep MySQL |
Install
SQL code
The Code is as follows: |
|
1. yum-y install perl-DBD-MySQL Yum-y install perl-DBD-MySQL
|
You can also install DBI, Data-ShowTable, and DBD-mysql components separately.
Use mysqlhotcopy
SQL code
The Code is as follows: |
|
1./usr/local/webserver/mysql5.1.57/bin/mysqlhotcopy tongchao/data1/backup/tongchao |