1, installation Xtrabackup
cd/usr/local/
Tar xvf percona-xtrabackup-2.0.8-587.tar.gz
MV percona-xtrabackup-2.0.8 Xtrabackup
Vim/root/.bash_profile
Path= $PATH: $HOME/bin:/usr/local/xtrabackup/bin
Source/root/.bash_profile
2. Full backup MySQL 5.1.73 database
Innobackupex--user=root--password=******--socket=/var/lib/mysql/mysql.sock/root
3. Install MySQL 5.6.36
Yum install-y autoconf automake imake libxml2-devel expat-devel cmake gcc gcc-c++ libaio libaio-devel BZR bison libtool N Curses5-devel
Groupadd-r MySQL
Useradd-r-G MySQL MySQL
Tar zxf mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz-c/usr/local/
cd/usr/local/
Ln-s Mysql-5.6.26-linux-glibc2.5-x86_64/mysql
Mkdir/mysqldata
Chown-r mysql.mysql/mysqldata/
CD MySQL
Chown-r root.mysql./*
scripts/mysql_install_db--user=mysql--datadir=/usr/local/mysql/data
CP Support-files/mysql.server/etc/init.d/mysqld
Chkconfig--add mysqld
vim/etc/profile.d/mysql.sh
Export path= $PATH:/usr/local/mysql/bin
. /etc/profile.d/mysql.sh
Service mysqld Start
Vim MY.CNF
DataDir =/mysqldata
Socket =/tmp/mysql.sock
Service mysqld Start
Mysql_secure_installation
Mysql-u root-p
4. Restore the database using Xtrabackup
Service mysqld Start
mv/usr/local/mysql/data/*/tmp
Innobackupex--socket=/tmp/mysql.sock--apply-log/root/2017-07-04_10-41-46
Innobackupex--socket=/tmp/mysql.sock--defaults-file=/usr/local/mysql/my.cnf--copy-back/root/2017-07-04_ 10-41-46
Chown-r Mysql.mysql/usr/local/mysql/data
Service mysqld Restart
Use percona-xtrabackup-2.0.8 to upgrade MySQL from 5.1.73 to 5.6.36