Mysqlhotcopy backup error bitsCN.com
Problem: mysqlhotcopy backup error
/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 capitalization of 'mysql' isn' t right.
Available drivers: DBM, ExampleP, File, Proxy, mongoge.
Solution
Download: http://search.cpan.org /~ DBD-mysql-3.0008/capttofu/
Tar zxvf DBD-mysql-3.0008.tar.gz
D/tmp/DBD-mysql-3.0008
Perl Makefile. PL -- mysql_config =/usr/local/mysql/bin/mysql_config
Make
Make install
After compilation and installation, an error is reported:
Install_driver (mysql) failed: Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/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
This is because the path configuration of tar after mysql is installed is incorrect.
Vi/etc/ld. so. conf
Add the path of this mysql library file
Echo "/usr/local/mysql/lib/mysql">/etc/ld. so. conf
Ldconfig
When mysqlhotcopy is executed, everything is normal.
One service has the following problems:
View the following questions and materials, and write down this question first:
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.
Cause: The DBI component is not installed as per.
Author "Holy"
BitsCN.com