使用innobackupex备份mysql遇到的问题
2015-06-04 17:40
513 查看
环境说明:
操作系统:CentOS 5.4 (x64)
mysql版本:5.6.22 (源码包安装)(安装路径:/usr/local/mysql/)
xtrabackup版本: percona-xtrabackup-2.0.0.tar.gz 和 percona-xtrabackup-2.2.9-5067-Linux-x86_64.tar.gz
操作步骤:
1. 将percona-xtrabackup-2.0.0.tar.gz 解压后,将bin下的innobackupex拷贝到/usr/local/mysql/bin下
2. vim /root/.bash_profile
export PATH=/usr/local/mysql/bin:$PATH
source /root/.bash_profile
3. 开始备份
[root@langkeziju132 ~]# innobackupex --user=root --password=123456 /data/backup/mysql
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
140628 23:29:54 innobackupex: Starting mysql with options: --password=xxxxxxxx --user='root' --unbuffered --
140628 23:29:54 innobackupex: Connected to database with mysql child process (pid=5509)
140628 23:30:00 innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql Ver 14.14 Distrib 5.6.22, for Linux (x86_64) using EditLine wrapper
Warning: Using a password on the command line interface can be insecure.
innobackupex: Using mysql server version Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
innobackupex: fatal error: no 'mysqld' group in MySQL options
innobackupex: fatal error: OR no 'datadir' option in group 'mysqld' in MySQL options
指定my.cnf
[root@langkeziju132 ~]# innobackupex --defaults-file=/usr/local/mysql/my.cnf --user=root --password='123456' /data/backup/mysql
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
140629 00:14:27 innobackupex: Starting mysql with options: --defaults-file='/etc/my.cnf' --password=xxxxxxxx --user='root' --unbuffered --
140629 00:14:27 innobackupex: Connected to database with mysql child process (pid=5992)
140629 00:14:33 innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql Ver 14.14 Distrib 5.6.22, for Linux (x86_64) using EditLine wrapper
Warning: Using a password on the command line interface can be insecure.
innobackupex: Using mysql server version Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
sh: --: invalid option
Usage: sh [GNU long option] [option] ...
sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--rpm-requires
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
innobackupex: fatal error: no 'mysqld' group in MySQL options
innobackupex: fatal error: OR no 'datadir' option in group 'mysqld' in MySQL options
无果,换个版本试试:换percona-xtrabackup-2.2.9-5067-Linux-x86_64.tar.gz
后来可以,说明是版本的问题。
操作系统:CentOS 5.4 (x64)
mysql版本:5.6.22 (源码包安装)(安装路径:/usr/local/mysql/)
xtrabackup版本: percona-xtrabackup-2.0.0.tar.gz 和 percona-xtrabackup-2.2.9-5067-Linux-x86_64.tar.gz
操作步骤:
1. 将percona-xtrabackup-2.0.0.tar.gz 解压后,将bin下的innobackupex拷贝到/usr/local/mysql/bin下
2. vim /root/.bash_profile
export PATH=/usr/local/mysql/bin:$PATH
source /root/.bash_profile
3. 开始备份
[root@langkeziju132 ~]# innobackupex --user=root --password=123456 /data/backup/mysql
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
140628 23:29:54 innobackupex: Starting mysql with options: --password=xxxxxxxx --user='root' --unbuffered --
140628 23:29:54 innobackupex: Connected to database with mysql child process (pid=5509)
140628 23:30:00 innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql Ver 14.14 Distrib 5.6.22, for Linux (x86_64) using EditLine wrapper
Warning: Using a password on the command line interface can be insecure.
innobackupex: Using mysql server version Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
innobackupex: fatal error: no 'mysqld' group in MySQL options
innobackupex: fatal error: OR no 'datadir' option in group 'mysqld' in MySQL options
指定my.cnf
[root@langkeziju132 ~]# innobackupex --defaults-file=/usr/local/mysql/my.cnf --user=root --password='123456' /data/backup/mysql
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
140629 00:14:27 innobackupex: Starting mysql with options: --defaults-file='/etc/my.cnf' --password=xxxxxxxx --user='root' --unbuffered --
140629 00:14:27 innobackupex: Connected to database with mysql child process (pid=5992)
140629 00:14:33 innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql Ver 14.14 Distrib 5.6.22, for Linux (x86_64) using EditLine wrapper
Warning: Using a password on the command line interface can be insecure.
innobackupex: Using mysql server version Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
sh: --: invalid option
Usage: sh [GNU long option] [option] ...
sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--rpm-requires
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
innobackupex: fatal error: no 'mysqld' group in MySQL options
innobackupex: fatal error: OR no 'datadir' option in group 'mysqld' in MySQL options
无果,换个版本试试:换percona-xtrabackup-2.2.9-5067-Linux-x86_64.tar.gz
后来可以,说明是版本的问题。
相关文章推荐
- mysql触发器
- MySQL事物系列:2:事物的实现
- 如何修改MySql用户密码
- Mysql用户与权限管理
- ubantu下安装mysql教程以及碰到的问题总结
- mysql数据库编码设置
- MySQL事物系列:1:事物简介
- Haproxy+Keepalived+MySQL实现读均衡负载
- 构建高性能web之路------mysql读写分离实战
- mysql用户资源限制
- 修改 mysql 的字符编码
- navicat导入mysql数据库sql时报错
- MySQL,hiah severitv error缺少根元素
- mysql二进制日志怎么开启_mysql查询日志的开启与关闭
- MySQL的启动和关闭
- mysql replication之binlog-do-db、binlog-ignore-db
- MySQL单条SQL语句性能评估
- MYCAT分布式MYSQL中间件(数据库切分概述)[转]
- mysql的innodb中事务日志ib_logfile
- MySQL 源码系列:1:窥探篇