当前位置:网站首页>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

边栏推荐
- Formulaire day05
- JSON string conversion in unity
- Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website
- Contest3145 - the 37th game of 2021 freshman individual training match_ J: Eat radish
- 深入浅出对话系统——使用Transformer进行文本分类
- Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
- Nbear introduction and use diagram
- warning: LF will be replaced by CRLF in XXXXXX
- Contest3145 - the 37th game of 2021 freshman individual training match_ D: Ranking
- Learning video website
猜你喜欢

Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex
![Stm32bug [stlink forced update prompt appears in keilmdk, but it cannot be updated]](/img/ad/b675364fcaf5d874397fd0cbfec11b.jpg)
Stm32bug [stlink forced update prompt appears in keilmdk, but it cannot be updated]

Hospital network planning and design document based on GLBP protocol + application form + task statement + opening report + interim examination + literature review + PPT + weekly progress + network to

(column 23) typical C language problem: find the minimum common multiple and maximum common divisor of two numbers. (two solutions)

JSON string conversion in unity

Summary of Chinese remainder theorem

No clue about the data analysis report? After reading this introduction of smartbi, you will understand!

Lichuang EDA learning notes 14: PCB board canvas settings

PHP database connection succeeded, but data cannot be inserted

If you have just joined a new company, don't be fired because of your mistakes
随机推荐
XSS prevention
PID of sunflower classic
基於.NetCore開發博客項目 StarBlog - (14) 實現主題切換功能
WordPress collection WordPress hang up collection plug-in
What is the difference between enterprise wechat applet and wechat applet
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Consul of distributed service registration discovery and unified configuration management
Third party login initial version
In my spare time, I like to write some technical blogs and read some useless books. If you want to read more of my original articles, you can follow my personal wechat official account up technology c
Jenkins configures IP address access
Why is it recommended that technologists write blogs?
Want to do something in production? Then try these redis commands
false sharing
[untitled]
Easy to win insert sort
Package details_ Four access control characters_ Two details of protected
The difference between MCU serial communication and parallel communication and the understanding of UART
Amélioration de l'efficacité de la requête 10 fois! 3 solutions d'optimisation pour résoudre le problème de pagination profonde MySQL
Defensive programming skills
Code Execution Vulnerability - no alphanumeric rce create_ function()