您的位置:首页 > 其它

xtrabackup备份执行报错一例

2016-05-17 20:23 357 查看
一、问题描述

在用xtrabackup在线完全备份mysql时报错:

[mysql@mvxl0782 ~]$ innobackupex --defaults-file=/data/mysql/mysql3376/my3376.cnf --user=xtrabk --password='onlybackup' /data/backup/

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy

and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.

This software is published under

the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

Get the latest version of Percona XtraBackup, documentation, and help resources:

http://www.percona.com/xb/p

160517 15:57:43 innobackupex: Connecting to MySQL server with DSN

'dbi:mysql:;mysql_read_default_file=/data/mysql/mysql3376/data/my3376.cnf;mysql_read_default_group=xtrabackup' as 'xtrabk' (using password: YES).

innobackupex: got a fatal error with the following stacktrace: at /usr/local/percona-xtrabackup-2.2.9-Linux-x86_64/bin/innobackupex line 2999

main::mysql_connect('abort_on_error', 1) called at /usr/local/percona-xtrabackup-2.2.9-Linux-x86_64/bin/innobackupex line 1539

innobackupex: Error: Failed to connect to MySQL server as DBD::mysql module is not installed at /usr/local/percona-xtrabackup-2.2.9-Linux-x86_64/bin/innobackupex line

2999.

二、问题分析

从上面明显看到DBD没有安装。

三、问题解决:

[root@mvxl0782 local]# yum install perl-DBD-MySQL

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

rhel6 | 4.0 kB 00:00

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed

--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64

--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64

--> Running transaction check

---> Package mysql-libs.x86_64 0:5.1.61-4.el6 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================

Package Arch Version Repository Size

====================================================================================================================================

Installing:

perl-DBD-MySQL x86_64 4.013-3.el6 rhel6 134 k

Installing for dependencies:

mysql-libs x86_64 5.1.61-4.el6 rhel6 1.2 M

Transaction Summary

====================================================================================================================================

Install 2 Package(s)

Total download size: 1.4 M

Installed size: 4.4 M

Is this ok [y/N]: y

Downloading Packages:

(1/2): mysql-libs-5.1.61-4.el6.x86_64.rpm | 1.2 MB 00:00

(2/2): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 134 kB 00:00

------------------------------------------------------------------------------------------------------------------------------------

Total 13 MB/s | 1.4 MB 00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : mysql-libs-5.1.61-4.el6.x86_64 1/2

warning: /etc/my.cnf created as /etc/my.cnf.rpmnew

Installing : perl-DBD-MySQL-4.013-3.el6.x86_64 2/2

Installed products updated.

Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64 1/2

Verifying : mysql-libs-5.1.61-4.el6.x86_64 2/2

Installed:

perl-DBD-MySQL.x86_64 0:4.013-3.el6

Dependency Installed:

mysql-libs.x86_64 0:5.1.61-4.el6

Complete!

再执行备份成功

[mysql@mvxl0782 ~]$ innobackupex --defaults-file=/data/mysql/mysql3376/my3376.cnf --user=xtrabk --password='onlybackup' --slave-info /data/backup/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: