1. Create a full backup in the current primary node (mysqldump or xtrabackup):
# /usr/bin/innobackupex --defaults-file=/etc/my.cnf --user=root --password='xxxx' /data/backup
2. Stop the failed instance of MySQL
# mysqladmin -uroot -p shutdown
3. Clear the current data directory
Note: Clear to back up what ever
4. Recovery full backup failure Example:
#/usr/bin/innobackupex --defaults-file=/etc/my.cnf --user root --socket=/tmp/mysql.sock --apply-log /data/backup
#/usr/bin/innobackupex --defaults-file=/etc/my.cnf --user root --socket=/tmp/mysql.sock --move-back /data/mysql
5. Start MySQL:
#mysqld_safe --user=mysql &
6. Update GTID_PURGE
mysql> RESET MASTER;
mysql> RESET SLAVE ALL;
mysql> SET SQL_LOG_BIN=OFF;
mysql> SOURCE datadir/backup_gtid_executed.sql
mysql> SET SQL_LOG_BIN=ON;
mysql> CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' FOR CHANNEL 'group_replication_recovery';
Startup group copy:
mysql> START GROUP_REPLICATION;
7. Check node state:
mysql> SELECT * member_host, member_port, member_state FROM performance_schema.replication_group_members;