配置MySQL复制
基于日志点的复制配置步骤
设置简单密码(可以选择不需要)
set GLOBAL validate_password_length=6;
set global validate_password_policy=0;
在主DB服务器上建立复制账号
CREATE user [email protected]'192.168.%.%' IDENTIFIED by '123456';
权限:
grant replication slave ON *.* to [email protected]'192.168.%.%';
基于日志点点复制配置步骤
配置主数据库服务器
bin_log = mysql-bin
server_id = 100
从服务器上的配置
*指定中继日志的名字
relay_log = mysql-relay-bin
*如果做链路复制需要开启
log_slave_update = on [可选]
*安全配置参数,没有sql权限的用户进行写操作
read_only = on [可选]
初始化从服务器数据
会加锁阻塞
mysqldump --master-data=2 -single-transaction
xtrabackup --slave-info
启动复制连路
CHANGE MASTER TO MASTER_HOST= 'master_host_ip',
MASTER_USER = 'repl',
MASTER_PASSWORD = '123456'
MASTER_LOG_FILE = 'mysql_log_file_name'
MASTER_LOG_POS = 4
注意:
主从的server-id 一定不能设置一致
优点
*是MySQL最早支持的复制技术,Bug相对较少
*对sql查询没有任何限制
*故障处理比较容易
缺点
*故障转移时重新获取新主的日志点信息比较困难
当前位置:网站首页>5-5配置Mysql复制 基于日志点的复制
5-5配置Mysql复制 基于日志点的复制
2022-06-12 16:03:00 【phpwyl】
边栏推荐
- UE4 common type conversion
- Web UI automation test
- 一步步创建包含自定义 Screen 的 ABAP 程序的详细步骤
- Unicom Network Management Protocol block diagram
- 【周赛复盘】LeetCode第80场双周赛
- 鼻孔插灯,智商上升,风靡硅谷,3万就成
- < 山东大学软件学院项目实训 > 渲染引擎系统——辐射预计算(八)
- Application of postman-rest client plug-in
- Redis string type common commands
- Project training of Software College of Shandong University rendering engine system radiation pre calculation (IX)
猜你喜欢

Introduction and download website of common data of GIS, remote sensing, hydrology and Geography (2), supplementary~

Project training of Software College of Shandong University rendering engine system point cloud processing (10)

org. xml. sax. SAXParseException; lineNumber: 63; columnNumber: 10; The definition of "mapper" in the related type must be matched with "(CAC

< 山东大学软件学院项目实训 > 渲染引擎系统——辐射预计算(八)

Getting started with JMeter

聊聊事件监听那些事-上

Project training of Software College of Shandong University rendering engine system basic renderer (V)

Decision tree classification and examples

Scanpy (VI) analysis and visualization of spatial transcriptome data

redis String类型常见命令
随机推荐
Let's talk about events. Listen to those things. - Part one
Daily leetcode - 3 Longest substring without duplicate characters
Idea Encyclopedia (Reprinted)
[browser principle] variable promotion
Task fruit Juicer 0611
Remote control of other computers -- detailed tutorial
Fiddler packet capturing (mobile app)
Analysis of China's cargo transport volume, cargo transport turnover and port cargo in 2021 [figure]
The nohup command uses
记一篇IT培训日记067-好人感恩,坏人无错
一步步创建包含自定义 Screen 的 ABAP 程序的详细步骤试读版
The small flying page is upgraded to be intelligent and the bug repair is faster
Use and understanding of generics
Unity get local video / download network video
< 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(三)
When programming is included in the college entrance examination...
go net库(待续)
FPGA (III) trigger and latch
In 2020, the demand for strain sensors in China will reach 9.006 million, and the market scale will reach 2.292 billion yuan [figure]
Keep an IT training diary 067- good people are grateful, bad people are right