The installation method of the hot standby percona-xtrabackup and Innobackupex of MySQL

Source: Internet
Author: User
Tags mysql version percona percona server

http://blog.csdn.net/dbanote/article/details/13295727

http://blog.csdn.net/yangzhawen/article/details/50457922

http://blog.csdn.net/yangzhawen/article/details/28864763

Xtrabackup is an open source software developed by Percona, which is an open source alternative to the InnoDB hot standby tool Ibbackup (paid commercial software). Xtrabackup consists of parts: Xtrabackup and Innobackupex, where xtrabackup tools are used to back up the InnoDB and XTRADB engine tables While the Innobackupex tool is used to back up the tables of the MyISAM and InnoDB engines, this article describes how to do full and incremental backups with the Innobackupex tool.

Official website:http://www.percona.com/docs/wiki/percona-xtrabackup:start

Installation

Disclaimer: The following operations are best performed with MySQL users.

First, download the source tar package via wget:

    1. wget http://www.percona.com/redir/downloads/XtraBackup/LATEST/source/percona-xtrabackup-2.1.5.tar.gz

To install a dependency package:

 
    1. Yum install cmake gcc gcc-c++ libaio libaio-devel automake autoconf BZR bison libtool ncurses-devel zlib-devel

Unzip tar:

 
    1. TAR-ZXVF percona-xtrabackup-2.1.5.tar.gz
    2. CD percona-xtrabackup-2.1.5

The utils/build.sh script will automatically extract and compile the appropriate MySQL source package according to the specified engine version, which is the simplest way to install it. When you execute the script without any parameters at the command line, the following prompt appears:

 
  1. [Email protected] ~/software/percona-xtrabackup-2.1.5]$./utils/build.sh
  2. Build an xtrabackup binary against the specified InnoDB flavor.
  3. Usage:build.sh CODEBASE
  4. Where CODEBASE can be one of the following values or aliases:
  5. innodb51 | Plugin build against InnoDB plugin in MySQL 5.1
  6. innodb55 | 5.5 Build against InnoDB in MySQL 5.5
  7. innodb56 | 5.6,XTRADB56, build against InnoDB in MySQL 5.6
  8. | mariadb100
  9. xtradb51 | XTRADB,MARIADB51 build against Percona Server with XTRADB 5.1
  10. | Mariadb52,mariadb53
  11. xtradb55 | Galera55,mariadb55 build against Percona Server with XtraDB 5.5

Depending on the prompts above and the storage engine and version you are using, select the appropriate parameters. Because I am using MySQL 5.6, the following statement is installed:

 
    1. ./utils/build.sh innodb56

After the execution of the above statement succeeds, the installation is complete. Finally, copy the generated binaries to a custom directory (in this case,/home/mysql/admin/bin/percona-xtrabackup-2.1.5) and place the directory in the environment variable path.

 
        1. CP./innobackupex/home/mysql/admin/bin/percona-xtrabackup-2.1.5
        2. CP./src/xtrabackup_56./src/xbstream/home/mysql/admin/bin/percona-xtrabackup-2.1.5
        3. Here I'm putting him direct CP into the/usr/bin directory

My MySQL version here is 5.6.23.
The Xtrabackup version I'm using here is 2.1.9.


Problems encountered during the installation
1:./utils/build.sh:line 173:patch:command not found
The workaround is: yum-y Install patch
And then execute it again.
./utils/build.sh innodb56

Here we create a normal user for hot standby
User-owned permissions are
SELECT, RELOAD, SHOW DATABASES, LOCK TABLES
Permissions List

1.Select Read

2.SHOW DATABASES allows access to the full list of databases

4. Lock TABLES allows locking of the table

5.RELOAD Allow server cache loading and flushing

The installation method of the hot standby percona-xtrabackup and Innobackupex of MySQL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.