mysqlhotcopy hint error cant locate DBI.PM solution

Source: Internet
Author: User
Tags install perl

Can ' 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 reason: The system did not press the install DBI component.

DBI (Database Interface) is the interface for Perl to connect to databases. It is the best way to connect to a database in Perl, and he supports including

The vast majority of databases such as ORCAL,SYBASE,MYSQL,DB2

Solution:

The code is as follows Copy Code
Apt-get Install Libclass-dbi-mysql-perl

This method is suitable for Debian,ubuntu,centos to try Yum

If it's Redhat/centos,

Execute command

The code is as follows Copy Code
01.yum Install PERL-DBI perl-dbd-mysql-y

If it's a stool, Ubuntu,

Execute command
01.apt-get PERL-DBI Perl-dbd-mysql

Workaround Two

Install DBI

Check DBI

SQL code

The code is as follows Copy Code
1.rpm-qa |grep PERL-DBD | grep MySQL
Rpm-qa |grep PERL-DBD | grep MySQL

Installation


SQL code

The code is as follows Copy Code
1.yum-y Install Perl-dbd-mysql
Yum-y Install Perl-dbd-mysql

Or a separate dbi, data-showtable, dbd-mysql three components


Using Mysqlhotcopy

SQL code

  code is as follows copy code
1./usr/local/ webserver/mysql5.1.57/bin/mysqlhotcopy  tongchao/data1/backup/tongchao 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.