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/
在用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/
相关文章推荐
- 表单验证插件Validate.js的使用
- 作业8
- Linux服务器压测
- Linux服务器压测
- mysql的一些查询优化,count优化,limit优化
- NSRunLoop
- 代码格式的重要性
- Tcpdump抓取 Android 网络包
- 编译PHP常用的参数的解释
- node+express+mongoose快速搭建电影网站
- sftp的用法
- Java第三天听课视频
- Linux Kernel Makefile之一概况
- DbVisualizer常见问题解答(ddl标签不存在)
- 动态规划之钢条切割问题自底向上发的实现(算法导论第15章)
- 格局与架构
- 深入理解“HelloWorld”小程序
- Java 单例设计模式
- HDU 1005 NumberSequence
- 数据结构实验之链表九:双向链表