当前位置:网站首页>Please, don't use the command line to configure MySQL master-slave replication. Isn't it fragrant to deploy with urlos interface?
Please, don't use the command line to configure MySQL master-slave replication. Isn't it fragrant to deploy with urlos interface?
2022-07-28 02:28:00 【It's tiger skin cat】
since URLOS-2.2.1 Version added mysql After the master-slave cluster , Users can easily create mysql Master-slave cluster ( One master, many followers ), There's no command line , Simple and easy to maintain .
One 、 Introduce
The database is based on MySQL-5.7 The database master-slave cluster , Its use is mainly reflected in two aspects :
1.1 Master slave copy
Build a database environment exactly like the main database , Called from database . The main database is usually a real-time business database , Generally speaking, there are :
As a backup database , After the main database server fails , Switch to continue working from database ;
It can be backed up from the database 、 Data statistics, etc , This does not affect the performance of the primary database .
1.2 Read / write separation
It means that different databases are used for reading and writing , Read and write databases are deployed on different servers ; Generally, the database environment for reading and writing is configured as , A written database , One or more read databases , Each database is located on different servers , Make full use of server performance and database performance ; Therefore, it will involve how to ensure the data consistency of reading and writing databases , At this time, it can be realized by master-slave replication technology .
Two 、 applications
The business throughput is very large , Read database ( It can be simply understood as the proportion and influence of ) It's a big load .
3、 ... and 、 Deployment method
step 1: Deploy the master database service
stay A Deployment on host MySQL-5.7, As the main database , Service name such as :mysql57001_master

stay 【 Set up 】 Lieutenant general Binary log format choice ROW, Required here !

step 2: Shut down the primary database
After the master database is deployed , Turn it off :

step 3: Package the master database file
Enter the file management tool of the main database :

Enter into data Catalog :

take mysql57001_master directories :


After packing , Restart the main database .
step 4: Deploy the slave database service
stay B Deployment on host MySQL-5.7, As a slave database , Pay attention to the difference between the service names of the master and slave databases :

stay 【 Set up 】 Lieutenant general Binary log format choice ROW, It is recommended that the format be consistent with the main database !

step 5: Overwrite the slave database with the master database file
Before coverage , First close the slave database :

Overwrite the slave database file with the previously packaged master database file :

Then set the current permission of the slave database file to “777”:


Last , Restart from database :

thus ,MySQL The master-slave cluster is deployed , There is no limit to the number of slave databases , You can add multiple MySQL From database , In order to meet the needs of high concurrency business .
边栏推荐
- Get the difference data of two sets
- Necessary knowledge points of the original group
- Mysql Explain 详解(荣耀典藏版)
- Under the new retail format, retail e-commerce RPA helps reshape growth
- Ceresdao: new endorsement of ventures Dao
- MySQL high availability and master-slave synchronization
- 四种常见的 POST 提交数据方式
- feign调用get和post记录
- Promise从入门到精通 (第1章 Promise的介绍和基本使用)
- Common problem types and methods of mathematical univariate differential proof problems in postgraduate entrance examination
猜你喜欢

Starfish Os打造的元宇宙生态,跟MetaBell的合作只是开始
![This operation may not be worth money, but it is worth learning | [batch cutting of pictures]](/img/e8/a34e471b0089f8085b140c74b5c01f.jpg)
This operation may not be worth money, but it is worth learning | [batch cutting of pictures]

借助Elephant Swap打造的ePLATO,背后的高溢价解析

使用BigDecimal类型应该避免哪些问题?(荣耀典藏版)

Under the new retail format, retail e-commerce RPA helps reshape growth

Leetcode hot topic Hot 100 - > 2. Add two numbers

结构伪类选择器—查找单个—查找多个—nth-of-type和伪元素

Detailed explanation of the lock algorithm of MySQL lock series (glory Collection Edition)

Day6 函数和模块的使用

Soft test - database (2) relational model
随机推荐
Vxe table/grid cell grouping and merging
Promise从入门到精通 (第2章 Promise的理解和使用)
Execute add migration migration and report build failed
Common problem types and methods of mathematical univariate differential proof problems in postgraduate entrance examination
考研数学一元微分学证明题常见题型方法
MySQL数据库InnoDB存储引擎中的锁机制(荣耀典藏版)
小程序毕设作品之微信校园浴室预约小程序毕业设计成品(3)后台功能
Flex layout learning completed on PC side
11 Django basics database operation
小程序毕设作品之微信校园浴室预约小程序毕业设计成品(1)开发概要
[advanced ROS] Lecture 9 robot model motion based on rviz and arbotix control
Feign calls get and post records
Day6 函数和模块的使用
[Yugong series] July 2022 go teaching course 019 - for circular structure
Eredi reappeared at the digital China Summit and continued to deepen the protection of green waters and mountains with science and technology
【Star项目】小帽飞机大战(六)
OBS keyboard plug-in custom DIY
This operation may not be worth money, but it is worth learning | [batch cutting of pictures]
MySQL 中的 INSERT 是怎么加锁的?(荣耀典藏版)
Shell regular and metacharacters