程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> mysqlhotcopy備份報錯

mysqlhotcopy備份報錯

編輯:MySQL綜合教程

問題: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”

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved