mysqlhotcopy备份报错

来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 07:25 点击:

问题:mysqlhotcopy备份报错
/usr/local/mysql/bin/mysqlhotcopy -u root -p  --addtodest --noindices --flushlog -q qeedoo /tmp/bak
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at (eval 7) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Proxy, Sponge.
解决
下载:http://search.cpan.org/~capttofu/DBD-mysql-3.0008/
tar zxvf DBD-mysql-3.0008.tar.gz
cd /tmp/DBD-mysql-3.0008
perl Makefile.PL --mysql_config=/usr/local/mysql/bin/mysql_config
make
make install
 
最后编译安装完之后 发现还是报错:
install_driver(mysql) failed: Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.16: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230.
 at (eval 7) line 3
Compilation failed in require at (eval 7) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /usr/bin/mysqlhotcopy line 177
 
是因为tar安装mysql后的路径配置的有问题
vi /etc/ld.so.conf
把mysql的这个库文件路径添加进去
 
echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
ldconfig

再执行mysqlhotcopy的时候,一切正常。

 
 
有一台服务出现如下问题:
以下问题待遇查看资料,先记下另外这个问题:
Can't locate DBI.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/local/mysql/bin/mysqlhotcopy line 8.
BEGIN failed--compilation aborted at /usr/local/mysql/bin/mysqlhotcopy line 8.
原因:系统没有按安装DBI组件。
作者“Holy”

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>

      推荐热点

      • mysql-mmm
      • mysqldump命令——MySQL数据库备份还原
      • Oracle数据导入MySQL的快捷工具:MySQL Migration Toolkit
      • 简简单单储存过程——循环一个select结果集
      • MySQL数据库十大优化技巧
      • Mysql安装笔记
      • Mysql主主复制架构配置
      • Mysql的Procedure 参数为NULL问题分析
      • MySQL Stmt预处理提高效率问题的小研究
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1