正在加载中……
最新消息:欢迎大家访问,导航分类不完善,如果找不到自己想要的文章,可以通过【关键词】来进行搜索,^_^!

[解决方法]mysqlhotcopy备份提示Can’t locate DBI.pm in @INC错误

Linux专题 REKFAN.COM 7849浏览 0评论

更多


mysqlhotcopy语法:
# /usr/local/mysql/bin/mysqlhotcopy –u root –p 密码 数据库名 备份目录

错误提示:
[root@REKFAN REKFAN]# mysqlhotcopy root -u root -p rekfan /server_bak/mysql_bak/2012-12-7
Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/mysql/bin/mysqlhotcopy line 25.
BEGIN failed--compilation aborted at /usr/local/mysql/bin/mysqlhotcopy line 25.

出错原因:没有安装 perl-DBI模块

解决方法:
 执行下面红色加粗标记的代码
[root@REKFAN REKFAN]# yum install perl-DBI perl-DBD-MySQL -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
 * base: mirror.bit.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirror.bit.edu.cn
 * http://blog.rekfan.com/?p=249
adobe-linux-x86_64                                                                    |  951 B     00:00    
base                                                                                  | 3.7 kB     00:00    
dag                                                                                   | 1.9 kB     00:00    
dag/primary_db                                                                        | 2.5 MB     00:05    
extras                                                                                | 3.5 kB     00:00    
extras/primary_db                                                                     |  23 kB     00:00    
updates                                                                               | 3.5 kB     00:00    
updates/primary_db                                                                    | 4.1 MB     00:02    
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================
  Package                       Arch                  Version                       Repository           Size
=================================================================================
Installing:
 perl-DBD-MySQL                x86_64                4.013-3.el6                   base                134 k
 perl-DBI                      x86_64                1.609-4.el6                   base                705 k

Transaction Summary
=================================================================================
Install       2 Package(s)

Total download size: 839 k
Installed size: 2.0 M
Downloading Packages:
(1/2): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm                                          | 134 kB     00:00    
(2/2): perl-DBI-1.609-4.el6.x86_64.rpm                                                | 705 kB     00:00    

-------------------------------------------------------------------------------------------------------------
Total                                                                        2.3 MB/s | 839 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : perl-DBI-1.609-4.el6.x86_64                                                               1/2
  Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                                         2/2
  Verifying  : perl-DBD-MySQL-4.013-3.el6.x86_64                                                         1/2
  Verifying  : perl-DBI-1.609-4.el6.x86_64                                                               2/2

Installed:
  perl-DBD-MySQL.x86_64 0:4.013-3.el6                      perl-DBI.x86_64 0:1.609-4.el6                    

Complete!
[root@REKFAN REKFAN]#
 

转载请注明:|REKFAN|系统运维| » [解决方法]mysqlhotcopy备份提示Can’t locate DBI.pm in @INC错误

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址