Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install the percona-xtrabackup-2.0.8 tool to upgrade MySQL5.1.73 to 5.6.36

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article is mainly about installing percona-xtrabackup-2.0.8 tools to upgrade MySQL5.1.73 to 5.6.36. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope that installing percona-xtrabackup-2.0.8 tools to upgrade MySQL5.1.73 to 5.6.36 can bring you some practical help.

1. Install 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 of 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 ncurses5-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

5. Update the database

Mysql_upgrade-u root-p

Install the percona-xtrabackup-2.0.8 tool to upgrade MySQL5.1.73 to 5.6.36 and that's it. If you want to know about other related issues, you can continue to follow our industry information. Our section will capture some industry news and professional knowledge to share with you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report