In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail what the filtering parameters are about MySQL 5.7replication, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
1. Library-level filter parameters
-- A library for binlog-do-db=db_name Master nodes to record binary logs
-- A library where the binlog-ignore-db=db_name Master node does not record binary logs
-- A library of replicate-do-db=db_name Slave node application logs
-- A library that does not apply logs to replicate-ignore-db=db_name Slave nodes
2. Table-level filtering parameters
-- the replicate-do-table=db_name.tbl_name Slave node executes the modification event of the specified table
-- the replicate-wild-do-table=db_name.tbl_name Slave node executes the modification event that contains the specified table in the rule
-- the replicate-ignore-table=db_name.tbl_name Slave node does not execute the modification event of the specified table
-- the replicate-wild-ignore-table=db_name.tbl_name Slave node does not execute the modification event containing the specified table in the rule
There are startup parameters and system parameters in MySQL. Startup parameters cannot be queried through show variables and can be found in the options of mysqld.
For example, there are Startup Options Used with Binary Logging and System Variables Used with Binary Logging parameters for binary logs.
The replication filtering parameters mentioned above are all startup parameters.
Set parameters
[root@localhost log] # mysqld-- verbose-- help > 02.txt
[root@localhost log] # vim 02.txt
..
-- binlog-do-db=name Tells the master it should log updates for the specified
Database, and exclude all others not explicitly
Mentioned.
..
-- binlog-ignore-db=name
Tells the master that updates to the given database
Should not be logged to the binary log.
..
-- replicate-do-table=name
Tells the slave thread to restrict replication to the
Specified table. To specify more than one table, use the
Directive multiple times, once for each table. This will
Work for cross-database updates, in contrast to
Replicate-do-db.
[root@localhost log] # vim / etc/my.cnf
..
# log
Server-id = 10000
Log-bin = / log/binlog/mysql-bin
Binlog_format = MIXED
Binlog-do-db = test
After starting the database, view the parameters
Mysql > show master status
+-+
| | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | |
+-+
| | mysql-bin.000009 | 120 | test | |
+-+
1 row in set (0.03 sec)
Which filter parameters about MySQL 5.7replication are shared here, I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.