Create a new (or repair a broken) GTID based slave

Create a new (or repair a broken) GTID based slaveSTEP 1: Take a backup from any server on the replication environment, master or slave 在任意节点全备: inno…

Create a new (or repair a broken) GTID based slave

innobackupex /data/backups/  

代码100分

代码100分$ cat xtrabackup_binlog_info
mysql-bin.000002 1232 c777888a-b6df-11e2-a604-080027635ef5:1-4  

STEP 2: Prepare the backup

TheMaster$ innobackupex --apply-log /data/backups/$TIMESTAMP/  

STEP 3: Move the backup to the destination server

代码100分TheMaster$ rsync -avprP -e ssh /path/to/backupdir/$TIMESTAMP NewSlave:/path/to/mysql/  

NewSlave$ chown mysql:mysql /path/to/mysql/datadir  

STEP 4: Configure and start replication

NewSlave > SET GLOBAL gtid_purged="c777888a-b6df-11e2-a604-080027635ef5:1-4";
NewSlave > CHANGE MASTER TO
MASTER_HOST="$masterip",
MASTER_USER="repl",
MASTER_PASSWORD="$slavepass",
MASTER_AUTO_POSITION = 1;  

注: innobackupex was previously deprecated and has been removed from Percona XtraBackup 8.0-3-rc1 .

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/8378.html

(0)
上一篇 2023-03-01
下一篇 2023-03-01

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注