binlog-do-db= //仅同步指定的库(多个库,可以用“ , ”逗号分隔)——>英文的逗号 ,
binlog-ignore-db= //忽略指定库
replicate_do_db= //仅同步指定的库
replicate_ignore_db= //忽略指定库
replicate_do_table= //仅同步指定的表
replicate_ignore_table= //忽略指定表,
- 例如:有一个临时表,写的数据非常快,数据也大,每天都需要删除这时就可以更新删除这个,那么就不需要每天去做同步
replicate_wild_do_table= //如aming.%, 支持通配符% 指定同步靠谱的匹配 同步表
replicate_wild_ignore_table= //如aming.%, 支持通配符% 指定同步靠谱的匹配 忽略表
[root@hanfeng ~]# mysql -uroot -phanfeng
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5562
Server version: 5.6.35-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> use zrlog;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql>
mysql> show tables;
+-----------------+
| Tables_in_zrlog |
+-----------------+
| comment |
| link |
| log |
| lognav |
| plugin |
| tag |
| type |
| user |
| website |
+-----------------+
9 rows in set (0.00 sec)
mysql>
mysql> select count(*) from website;
+----------+
| count(*) |
+----------+
| 9 |
+----------+
1 row in set (0.00 sec)
mysql>