配置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】
边栏推荐
- Unity get local video / download network video
- 聊聊事件监听那些事-上
- Saga体系结构模式:微服务架构下跨服务事务的实现
- Unicom Network Management Protocol block diagram
- tinyint和int区别
- ER diagram made by StarUML based on the last student achievement management system
- Let's talk about events. Listen to those things. - Part one
- 小程序:如何在插件中获取用户手机号
- Solutions to some problems of scuacm22 retreat competition before summer training
- IGMP报文(TCP/IP详解卷1/卷2)
猜你喜欢

Acwing summer daily question (sexy prime number on June 10)

Interface.

如何使用Grafana轻松实现OVL数据可视化

【工具推荐】个人本地 markdown 知识图谱软件 Obsidian

Decision tree classification and examples

Writing code can also be classified as "manual" or "vulgar", and we should be good at finding good hands!

jupyter notebook新環境快捷方式

Applet: how to get the user's mobile number in the plug-in
![CUDA out of memory or brokenpipeerror: [errno 32] broken pipe or oserror: [winerror 1455] solution to the problem that the page file is too small](/img/2c/63f1c865105a74ed651bb0ef97ab60.png)
CUDA out of memory or brokenpipeerror: [errno 32] broken pipe or oserror: [winerror 1455] solution to the problem that the page file is too small

2022.02.28 - SX11-05. The largest rectangle in the histogram
随机推荐
Find the number of cells (connectivity map, wide search, deep search)
作业提交说明 上传作业到网盘中
MySQL development considerations (Alibaba development manual)
C语言 分割bin文件程序
Solutions to some problems of scuacm22 retreat competition before summer training
Getting started with JMeter
< 山东大学软件学院项目实训 > 渲染引擎系统——辐射预计算(八)
Broadcast and multicast (tcp/ip details volume 1/2)
Analysis of China's cargo transport volume, cargo transport turnover and port cargo in 2021 [figure]
IGMP报文(TCP/IP详解卷1/卷2)
Solution of user and root forgetting password in virtual machine
Task fruit Juicer 0611
When programming is included in the college entrance examination...
Unity get local video / download network video
Apache Kylin 历险记
Task output: dense snow ice city theme song 0612
tinyint和int区别
Dongmingzhu talks about batteries: the most essential thing is safety
Job submission instructions upload jobs to network disk
TS 22.011