In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces you how to synchronize mysql AB replication, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Project environment:
The systems are all cent os 5.5,
Primary server IP:192.168.19.172 (master)
Slave server IP:192.168.19.168 (slave)
Both stations have set up mysql (root user, password is empty)
1: set synchronization master and modify mysql main configuration file:
Server-id = 1
Log-bin
Set-variable=binlog-ignore-db=mysql
2: then add an account to Master for synchronization, as follows:
GRANT REPLICATION SLAVE ON *. * TO IDENTIFIED BY rep
3: query master status (master)
Show master status
Note:
Record the file and position parameters on the master server
4: configure slave server slave, modify configuration file
Modify my.cnf by adding the following lines:
Server-id = 2
Master-user = rep
Master-password = rep
Master-port = 3306
5: configure command items,
6:start slave; has replication enabled
7: view synchronization status,
Note:
Slave_IO_Running: Yes and Slave_SQL_Running: Yes if these two states are not yes, please check whether the above configuration is correct, mainly whether the file and position settings are correct, and whether the slave database can be logged in with the account of the master database.
On how to carry out mysql synchronization AB replication is shared here, I hope the above content can be of some help to you, can 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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope




Set @ sql0 = strData;prepare tem from @ sql0;execute tem

About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.