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)06/01 Report--
Let's talk about the multi-source replication method of building MySQL5.7. The secret of the text is to be close to the topic. So, no gossip, let's go straight to the following, I believe you will benefit from reading this article on how to build multi-source replication of MySQL5.7.
The experiment of MySQL5.7 multi-source replication
Environment:
Node1: 192.168.2.171 main Library 1
Node3: 192.168.2.170 main Library 2
Node2: 192.168.2.172 slave library for archiving
1. On node2, you need to configure replication to filter out the mysql library:
Replicate_wild_ignore_table=mysql.%
Replicate_wild_ignore_table=test.%
# 5.7 you can directly use stop slave; CHANGE REPLICATION FILTER REPLICATE_WILD_IGNORE_TABLE = ('mysql.%','test.%'); start salve; to dynamically modify the replication filter library.
2. Import the backup mysqldump-uxx-pxx-Q-- single-transaction-- master-data=2 on node1 and node3 into node2.
3. Configure master-slave replication on node2
Execute on node2:
Change master to
Master_host='192.168.2.171'
Master_user='rpl'
Master_password='rpl'
Master_port=3306
Master_log_file='mysql-bin.000001'
Master_log_pos=4 for channel 'master-1'
Change master to
Master_host='192.168.2.170'
Master_user='rpl'
Master_password='rpl'
Master_port=3306
Master_log_file='mysql-bin.000001'
Master_log_pos=12 for channel 'master-2'
Start replication:
Start slave for channel 'master-1'
Start slave for channel 'master-2'
View status:
Show slave status for channel 'master-1'\ G
Show slave status for channel 'master-2'\ G
Stop:
Stop slave for channel 'master-1'
Stop slave for channel 'master-2'
Clear synchronization information and logs:
Reset slave for channel 'master-1'
Reset slave for channel 'master-2'
Swipe relaylog:
Flush relay logs for channel 'master-1'
Flush relay logs for channel 'master-2'
Is there anything you don't understand about the above multi-source replication method for building MySQL5.7? Or if you want to know more about it, you can continue to follow our industry information section.
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.