当前位置:网站首页>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 .
边栏推荐
- Promise从入门到精通 (第1章 Promise的介绍和基本使用)
- Product interpretation - Design and distributed expansion of metersphere UI test module
- 重要安排-DX12引擎开发课程后续直播将在B站进行
- Smart contract security -- selfdestroy attack
- MySQL锁系列之锁算法详解(荣耀典藏版)
- Necessary knowledge points of software engineering
- Principle and implementation of cross entropy
- Promise from introduction to mastery (Chapter 1 Introduction and basic use of promise)
- 小程序毕设作品之微信校园维修报修小程序毕业设计成品(4)开题报告
- 上课笔记(5)(1)——#593. 二分查找(binary)
猜你喜欢

Flex development web page instance web side
![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]

并发编程的三大核心问题(荣耀典藏版)

Common problem types and methods of mathematical univariate differential proof problems in postgraduate entrance examination

Appium click operation sorting

Use of Day6 functions and modules

【ROS进阶篇】第九讲 基于Rviz和Arbotix控制的机器人模型运动

The cooperation between starfish OS and metabell is just the beginning

LeetCode 热题 HOT 100 -> 3. 无重复字符的最长子串

Go learning 01
随机推荐
Appium click operation sorting
Wechat campus maintenance and repair applet graduation design finished product of applet completion work (4) opening report
学会这招再也不怕手误让代码崩掉
小程序毕设作品之微信校园浴室预约小程序毕业设计成品(1)开发概要
Ceresdao: new endorsement of ventures Dao
Flex布局—固定定位+流式布局—主轴对齐—侧轴对齐—伸缩比
C # using ABP warehouse to access the database error record set
CeresDAO:Ventures DAO的“新代言”
Go learning 01
Which database is the fastest to query data only?
What problems should be avoided when using BigDecimal type? (glory Collection Edition)
[Star Project] small hat aircraft War (V)
Principle and implementation of cross entropy
小程序毕设作品之微信校园浴室预约小程序毕业设计成品(3)后台功能
Flex development web page instance web side
SFTP file / folder upload server
Eredi reappeared at the digital China Summit and continued to deepen the protection of green waters and mountains with science and technology
In practical work, how do I use postman for interface testing?
Ceresdao: the world's first decentralized digital asset management protocol based on Dao enabled Web3.0
Data output - dynamic drawing