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

边栏推荐
- Third party login initial version
- Sword finger offer:55 - I. depth of binary tree
- [PaddleSeg 源码阅读] PaddleSeg 自定义数据类
- The difference between MCU serial communication and parallel communication and the understanding of UART
- Learning video website
- National standard gb28181 protocol platform easygbs fails to start after replacing MySQL database. How to deal with it?
- 2022 registration examination for safety production management personnel of fireworks and firecracker production units and examination skills for safety production management personnel of fireworks an
- What is the difference between enterprise wechat applet and wechat applet
- Imperial cms7.5 imitation "D9 download station" software application download website source code
- [database I] database overview, common commands, view the table structure of 'demo data', simple query, condition query, sorting data, data processing function (single row processing function), groupi
猜你喜欢

Monitoring - Prometheus introduction

PID of sunflower classic

Nbear introduction and use diagram

Why is it recommended that technologists write blogs?

JVM family -- heap analysis

MySQL query
![[Wu Enda deep learning] beginner learning record 3 (regularization / error reduction)](/img/e9/818bdfeae766dca7d2318b52b4424d.jpg)
[Wu Enda deep learning] beginner learning record 3 (regularization / error reduction)

Package details_ Four access control characters_ Two details of protected

Record a problem that soft deletion fails due to warehouse level error

Tsinghua University product: penalty gradient norm improves generalization of deep learning model
随机推荐
Setting methods, usage methods and common usage scenarios of environment variables in postman
渗透实战-guest账户-mimikatz-向日葵-sql提权-离线解密
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
POSTECH | option compatible reward reverse reinforcement learning
XSS prevention
Lichuang EDA learning notes 14: PCB board canvas settings
[Wu Enda deep learning] beginner learning record 3 (regularization / error reduction)
functools下的reduce函数
96% of the collected traffic is prevented by bubble mart of cloud hosting
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
[untitled]
Examination question bank of constructor decoration direction post skills (constructor) and examination data of constructor decoration direction post skills (constructor) in 2022
潘多拉 IOT 开发板学习(HAL 库)—— 实验6 独立看门狗实验(学习笔记)
Learning video website
National standard gb28181 protocol platform easygbs fails to start after replacing MySQL database. How to deal with it?
Consul of distributed service registration discovery and unified configuration management
The difference between MCU serial communication and parallel communication and the understanding of UART
Site favorites
Unity knapsack system (code to center and exchange items)
Contest3145 - the 37th game of 2021 freshman individual training match_ J: Eat radish