mysqlhotcopy备份报错该怎么解决

51次阅读
没有评论

共计 1973 个字符,预计需要花费 5 分钟才能阅读完成。

mysqlhotcopy 备份报错该怎么解决,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面丸趣 TV 小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

问题: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.
解决
下载:
tar zxvf DBD–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 组件。

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注丸趣 TV 行业资讯频道,感谢您对丸趣 TV 的支持。

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-17发表,共计1973字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)