MySQL turns on Gtid and multi-threaded replication

Source: Internet
Author: User

Tag:port    Support    ons   syn   pos    enforce    restart     database    binlog   

1. Modify Parameters Master:gtid_mode = on                       --Open Gtid Must open enforce-gtid-consistency = on    --to open Gtid This has to be turned on slave_parallel_workers=4          --Open library-based multi-threaded replication default 0 does not open   5.6 can only support one database to open a thread, 5.7 can open multiple threads in one database Binlog_cache_size = 8m max_binlog_ Size = 50m max_binlog_cache_size = 100m sync_binlog = 1 expire_logs_days = 1 log-slave-updates= true              --Open Gtid This must be turned on  slave:binlog_format = Rowgtid_mode = onenforce-gtid-consistency = Onbinlog_cache_size = 8mmax_binlog_size = 50mmax_binlog_cache_size = 100Msync_binlog = 1expire_logs_days = 1slave_parallel_workers=4max_relay_log_size = 50mrelay_log_purge = 1relay_log_recovery = 1 & Nbsp;master_verify_checksum = 1        --Main Event Check slave_sql_verify_checksum = 1     --from event checksum slave_allow_batching = 1log-slave-updates=true 2. Restart the database mysqladmin-uroot-hloalhost-p shutdown/usr/local/mysql/bin/mysqld_safe& 3. On the slave side Changechange master to master_host= ' 192.168.10.100 ', master_port=3306,master_user= ' repl ', master_password= ' 123456 ', master_auto_position=1;4. View Show slave status \g             Retrieved_Gtid_Set:43ea2a1b-5fcc-11e8-8e35-000c29d02a8e:4             executed_gtid_set:43ea2a1b-5fcc-11e8-8e35-000c29d02a8e:1-4

MySQL turns on gtid and multi-threaded replication

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.