GTID主从复制模式-各类ignore配置项的生效范围 (Replicate_Wild_Ignore | Replicate_Ignore)...

本文通过实验探讨了MySQL中Replicate_Ignore_DB、Replicate_Ignore_Table及Replicate_Wild_Ignore_Table等参数对GTID主从同步复制的影响,并详细记录了不同配置下从库的同步情况。
  • Replicate_Wild_Ignore_Table, Replicate_Ignore_Table, Replicate_Ignore_DB参数配置对GTID主从同步复制的影响 (实验证明

    • 下表中,在各种配置项下,主从同步是否在从库上执行。操作语句为 grant all on *.* to 'aaa'; drop user 'aaa';
mysql使用的数据库Replicate_Ignore_DBReplicate_Ignore_TableReplicate_Wild_Ignore_Table
use mysql不同步同步不同步,从库开空事务跳过。
不设置库,使用其它库操作同步同步不同步,从库开空事务跳过。
  • 查看binary-log的几种方法
    • 在mysql中:
    mysql> show binary logs;
    +------------------+-----------+
    | Log_name         | File_size |
    +------------------+-----------+
    | mysql-bin.000011 |  92393261 |
    | mysql-bin.000012 |       792 |
    | mysql-bin.000013 |       473 |
    | mysql-bin.000014 |       675 |
    | mysql-bin.000015 |       561 |
    | mysql-bin.000016 |       592 |
    | mysql-bin.000017 |      1066 |
    +------------------+-----------+
    7 rows in set (0.00 sec)
    mysql> show binlog events in 'mysql-bin.000017'\G
    • 在本地查看:
     bin/mysqlbinlog var/mysql-bin.000011 | grep aaa -C 10
  • 参考:
    Mysql 复制过滤详解

转载于:https://www.cnblogs.com/PeanutButter/p/10186263.html

*************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 192.168.60.149 Master_User: diliDBReplicator Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.003022 Read_Master_Log_Pos: 88951904 Relay_Log_File: relay-cg.000095 Relay_Log_Pos: 885276157 Relay_Master_Log_File: mysql-bin.002959 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 885275943 Relay_Log_Space: 67758076499 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 1703404 Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 10 Master_UUID: e80b376c-129d-11eb-810a-00163e067573 Master_Info_File: mysql.slave_master_info SQL_Delay: 0 SQL_Remaining_Delay: NULL Slave_SQL_Running_State: waiting for handler commit Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: e80b376c-129d-11eb-810a-00163e067573:1089055791-1132881668 Executed_Gtid_Set: ceabcbd2-6587-11ee-a4d2-00163e2e1bb2:97885-9041020, e80b376c-129d-11eb-810a-00163e067573:479315513-1132674283, eeb66959-129d-11eb-ab41-00163e320b8a:1-20146 Auto_Position: 0 Replicate_Rewrite_DB: Channel_Name: cg Master_TLS_Version: Master_public_key_path: Get_master_public_key: 0 Network_Namespace: 这个看起来是什么问题?
最新发布
05-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值