黑帽联盟

标题: Percona Xtrabackup进行备份mysql数据库常见错误 [打印本页]

作者: admin    时间: 2016-11-8 01:02
标题: Percona Xtrabackup进行备份mysql数据库常见错误
装好Percona Xtrabackup之后,进行全备份出现了一下错误:

第一处错误:
Can't locate Time/HiRes.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/bin/innobackupex line 24.
BEGIN failed--compilation aborted at /usr/bin/innobackupex line 24.

解决方法: yum install  perl-Time-HiRes -y


第二处错误:
innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/db/mysql5.6/my.cnf;mysql_read_default_group=xtrabackup' as 'bkpuser'  (using password: YES).
innobackupex: Error: Failed to connect to MySQL server as DBD::mysql module is not installed at /usr/bin/innobackupex line 2960.

解决方法:yum install perl-DBD-MySQL -y


第三处错误:
InnoDB: The error means the system cannot find the path specified.
InnoDB: File ./ib_logfile0: 'open' returned OS error 71. Cannot continue operation
innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2681.

解决方法:在后面加上
--defaults-file参数,后面跟上mysql的配置文件所在的路径


第四处错误:
提示无法连接mysql.sock文件,原因是:我安装数据库是指定安装路径的,而它默认是从usr下去找的

解决方法:加上-socket参数,后面跟上mysql.sock所在的路径地址




欢迎光临 黑帽联盟 (https://bbs.cnblackhat.com/) Powered by Discuz! X2.5