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

  • Replicate_Wild_Ignore_Table, Replicate_Ignore_Table, Replicate_Ignore_DB参数配置对GTID主从同步复制的影响 (实验证明

    • 下表中,在各种配置项下,主从同步是否在从库上执行。操作语句为 grant all on *.* to 'aaa'; drop user 'aaa';
mysql使用的数据库 Replicate_Ignore_DB Replicate_Ignore_Table Replicate_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 复制过滤详解](http://keithlan.github.io/2015/11/02/mysql_replicate_rule/)
posted @ 2018-12-27 17:34  pea_nut  阅读(239)  评论(0)    收藏  举报