Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The experiment of MySQL5.7 multi-source replication

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The experiment of MySQL5.7 multi-source replication

Node1: 192.168.2.171 master1

Node2: 192.168.2.172 slave

Node3: 192.168.2.170 master2

Execute on node2:

Change master to

Master_host='192.168.2.171'

Master_user='rpl'

Master_password='Abcd@1234'

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='Abcd@1234'

Master_port=3306

Master_log_file='mysql-bin.000001'

Master_log_pos=12 for channel 'master-2'

Start:

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'

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report