Mysqlhotcopy prompts error CantlocateDBI. pm Solution

Source: Internet
Author: User
Tags install perl
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

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.