Use percona-xtrabackup-2.0.8 to upgrade MySQL from 5.1.73 to 5.6.36

Source: Internet
Author: User
Tags percona

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

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.