In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The following is about mysql 5.7.26-log complete preparation and recovery process and order, the secret of the text is close to the topic. So, gossip will not talk about, we directly look at the following bar, I believe that after reading mysql 5.7.26-log complete preparation and recovery process and order of this article you will certainly benefit.
#on mysql 5.7.26-log complete preparation and recovery process and sequence;
#Version 2.4 only supports 5.7 ;
#!/ bin/bash
# centos 7.6 x86_64
# mysql 5.7.26-log
# 2019.9.10
# https://www.percona.com/downloads/XtraBackup/
# wget -c https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.9/binary/redhat/6/x86_64/percona-xtrabackup-24-2.4.9-1.el6.x86_64.rpm --no-check-certificate
# yum -y localinstall percona-xtrabackup-24-2.4.9-1.el6.x86_64.rpm
yum -y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl-DBD-MySQL libev-devel
MYCNF=/owhat/mysql-5.7
HOST=localhost
USER=root
PASS=amunlinux
PORT=65306
SOCK=/owhat/mysql-5.7/logs/mysql.sock
DATA=/owhat
DATE=$(date +%Y-%m-%d)
which innobackupex
/usr/bin/innobackupex \
--defaults-file="$MYFILEDIR" \
--user="$USER" \
--port="$PORT" \
--host="$HOST" \
--password="$PASS" \
--parallel=32 \
-S "$SOCK" \
--no-timestamp "$DATA"/"$DATE"
########################
#Strictly in order
1. Slave recovery preparation
innobackupex --defaults-file=/owhat/mysql-5.7/my.cnf \
--user=root --use-memory=6G --apply-log /owhat/2019-09-10/
2, slave stop and backup
/etc/init.d/mysqld stop
mv /owhat/mysql-5.7/data /root/mysql-data.bak
3. Slave recovery
innobackupex --defaults-file=/owhat/mysql-5.7/my.cnf \
--user=root --use-memory=6G --copy-back /owhat/2019-09-10/
4、chown -R mysql:mysql /owhat/
/etc/init.d/mysqld start
Explanation of several parameters
--use-memory=6G Specifies how much memory is used to improve recovery speed. The default seems to be 100M. This depends on how much free memory OS has left.
--apply-log This is the application log. My personal understanding is to generate the database log to be recovered.
--copy-back Start recovery Copy to the corresponding location according to datadir in my.cnf
#Post the basic database configuration to exist
[mysqld]
basedir =/owhat/mysql-5.7
datadir=/owhat/mysql-5.7/data
socket=/owhat/mysql-5.7/logs/mysql.sock
log-error =/owhat/mysql-5.7/logs/error.log
pid-file=/owhat/mysql-5.7/logs/mysqld.pid
For the above mysql 5.7.26-log complete preparation and recovery process and sequence related content, what do you still do not understand? Or if you want to know more about it, you can continue to pay attention to our industry information section.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.