MySQL 8.0.11 INNODB cluster Operations Management Handbook three additional nodes

Source: Internet
Author: User

MySQL 8.0.11 INNODB cluster Operations Management Handbook Three added node author Fanglian

Assume
InnoDB cluster cluster ran for 1 years, suddenly a node hung out, this time, the log has not binlog.000001, if the online add a from the library, the official given Mysqlbackup based on
Recovery method, in the remaining from the library to do the backup, in the new from the library, here are some technical points, I ignored, distressed for a long time.

To create an experimental environment:
    1. Frequent operation of data to write the storage, switch four binlog. Flush logs, show binary logs

    2. Observing log time information from library
      From the Binlog and Relay-log of library 1

From the Binlog and Relay-log of library 2

You can see that the main library switches logs from the library and does not switch

    1. Clean out the 1th, 2 binglog, write some data,
      PURGE MASTER LOGS TO ‘binlog.000003‘;

    2. At this point one hangs from the library and restarts the host
    3. The main library continues to write data manually, finds it hangs from the library, and needs to add
Step 1 Full-scale backup:
mysqlbackup --host=127.0.0.1 --port=3310 --user=backup --password=$$$$$$$$  --no-history-logging --backup-dir=/data/backup/fullbak   --with-timestamp backup-and-apply-log

--no-history-logging cannot write backup information to database because it is operating from library

Step 2: Copy to new slave recovery from library

Back up the compressed copy to the slave and unzip

scp [email protected]:/data/backup/fullbak/2018-07-25_14-32-32.tar.gz .tar -xzvf 2018-07-25_14-32-32.tar.gz

Copy the live configuration file from the library, modify the information in the Group copy section

Step 3: Continue inserting data into the main library Step 4: Recovering new instances

Recovering from the library database
Mysqlbackup--defaults-file=/data/mysql_3310_test/conf/my.cnf--backup-dir=/data/backup/fullbak/2018-07-26_ 20-59-35 Copy-back-and-apply-log

Step 5: Clean up old information

To turn off logging:

set sql_log_bin=off;use mysqldelete from slave_relay_log_info ;delete from slave_master_info ;set  sql_log_bin=on;

Note that this cannot be done
Reset Master and reset Slave
And
Drop Database Mysql_innodb_cluster_metadata

Restart the database, there should be no error.

Step 6 Shell Delete and add instances

Force deletion of suspended instances
cluster.removeInstance(‘[email protected]:3310‘,{force:1})

Add an instance
cluster.addInstance(‘[email protected]:3310‘)

Record of stepping on pits

Group replication increases the membership mode and the InnoDB cluster cluster adds members differently,

    • . Group replication has reset master and reset slave operations, and also includes the operation to set up Gtid
      SET @ @GLOBAL. Gtid_purged= ' 80d2433f-8f24-11e8-a8df-000c29f1584d:123 ';

    • . Innodb cluster, cannot do reset master, because the Gtid value that the backup library executes is logged.
      You should use MySQL Shell to delete and add instances

MySQL 8.0.11 INNODB cluster Operations Management Handbook three additional nodes

Related Article

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.