当前位置:网站首页>MySQL one master multiple slaves + linear replication
MySQL one master multiple slaves + linear replication
2022-07-04 03:33:00 【Why do you want hot pot】
Advantages of linear replication
Traditional one master multi slave replication for example A--->B A---->C A----->D Yes A The requirements of nodes are high
In order to alleviate A Node pressure We can use linear replication That is to say A------>B------->C
Now let's configure a group server1----->server2----->server3 Of mysql Linear replication structure
One 、 To configure slave node server3
First of all, make sure server1----->server2 Master slave copy succeeded ! In the last blog section, I have talked about it in detail .
Then configure server3 from server1.2 Copy various configuration files to server3
Build users + Create directory (server3 On )
Add Directory
modify server3 Of myconf file (id To work with server1 server2 Different )
initialization + Set up mysql password
Access to database Because you need to back up basic data Establishment of important counties westos database
Come here server3 The basic configuration of the database has been completed
But because of server1 server2 The database itself has some data If you want to set linear replication The basic data must be consistent
So back up the basic data And send it to server3
Two 、 The backup data And send it to server3
from server1 Backup westos data and Send to server3
stay server3 Send the backed up data to the database
After sending successfully The discovery of entering the database The basic data has been exactly the same
3、 ... and 、 To configure server2----->server3
In the previous master-slave replication server2 As slave stay Linear replication server2 Accomplished master Again slave
So we need to configure again server2------>server3
Start binary thread As master The second process must be started
Next configure server2------->server3(server2 As master server3 As slave)
Get into server2 The database of establish repl User and authorization
see file poistion And Insert new data
Get into server3 The database of
Establish master-slave replication And open
see sever3 slave state
There are two yes Indicating successful configuration !
Four 、 test
stay srver3 Database view data And server1 It's exactly the same
however server3 Data is copied server2 d Of
stay srver2 Database view data And server1 It's exactly the same
边栏推荐
- false sharing
- Webhook triggers Jenkins for sonar detection
- JSON string conversion in unity
- Enhanced for loop
- Jenkins configures IP address access
- Unity knapsack system (code to center and exchange items)
- Aperçu du code source futur - série juc
- Dare to climb here, you're not far from prison, reptile reverse actual combat case
- [Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love
- Teach you how to optimize SQL
猜你喜欢
Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex
Unity knapsack system (code to center and exchange items)
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
Jenkins configures IP address access
Explain AI accelerator in detail: why is this the golden age of AI accelerator?
Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
Monitoring - Prometheus introduction
I stepped on a foundation pit today
Fudan released its first review paper on the construction and application of multimodal knowledge atlas, comprehensively describing the existing mmkg technology system and progress
选择排序与冒泡排序模板
随机推荐
【.NET+MQTT】.NET6 環境下實現MQTT通信,以及服務端、客戶端的雙邊消息訂閱與發布的代碼演示
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
Contest3145 - the 37th game of 2021 freshman individual training match_ E: Eat watermelon
functools下的reduce函数
Solve the problems encountered by the laravel framework using mongodb
Third party login initial version
Add IDM to Google browser
Typical applications of minimum spanning tree
Stm32bug [stlink forced update prompt appears in keilmdk, but it cannot be updated]
2006 translation
The difference between MCU serial communication and parallel communication and the understanding of UART
Contest3145 - the 37th game of 2021 freshman individual training match_ D: Ranking
Webhook triggers Jenkins for sonar detection
Www 2022 | taxoenrich: self supervised taxonomy complemented by Structural Semantics
super_ Subclass object memory structure_ Inheritance tree traceability
Site favorites
MySQL data query optimization -- data structure of index
what does ctrl + d do?
This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t
Consul of distributed service registration discovery and unified configuration management