当前位置:网站首页>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
边栏推荐
- Zhihu million hot discussion: why can we only rely on job hopping for salary increase? Bosses would rather hire outsiders with a high salary than get a raise?
- Contest3145 - the 37th game of 2021 freshman individual training match_ F: Smallest ball
- System integration meets the three business needs of enterprises
- PMP 考試常見工具與技術點總結
- JVM family -- monitoring tools
- Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
- How to use STR function of C language
- [PaddleSeg 源码阅读] PaddleSeg计算Dice
- PHP database connection succeeded, but data cannot be inserted
- Recursive structure
猜你喜欢
Don't disagree, this is the most powerful "language" of the Internet
Setting methods, usage methods and common usage scenarios of environment variables in postman
Tsinghua University product: penalty gradient norm improves generalization of deep learning model
Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
Fudan released its first review paper on the construction and application of multimodal knowledge atlas, comprehensively describing the existing mmkg technology system and progress
New year's first race, submit bug reward more!
Consul of distributed service registration discovery and unified configuration management
functools下的reduce函数
Want to do something in production? Then try these redis commands
Typical applications of minimum spanning tree
随机推荐
Typical applications of minimum spanning tree
The property of judging odd or even numbers about XOR.
How to pipe several commands in Go?
Backpropagation formula derivation [Li Hongyi deep learning version]
微信公众号网页授权
2022 Guangxi provincial safety officer a certificate examination materials and Guangxi provincial safety officer a certificate simulation test questions
Handler source code analysis
Basé sur... Netcore Development blog Project Starblog - (14) Implementation of theme switching function
PMP 考試常見工具與技術點總結
Aperçu du code source futur - série juc
Setting methods, usage methods and common usage scenarios of environment variables in postman
What are the virtual machine software? What are their respective functions?
Keepalived set the master not to recapture the VIP after fault recovery (it is invalid to solve nopreempt)
Want to do something in production? Then try these redis commands
Base d'apprentissage de la machine: sélection de fonctionnalités avec lasso
Contest3145 - the 37th game of 2021 freshman individual training match_ G: Score
[PaddleSeg 源码阅读] PaddleSeg 自定义数据类
Audio and video technology development weekly | 232
Unity controls the selection of the previous and next characters
[untitled]