配置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】
边栏推荐
- 一步步创建包含自定义 Screen 的 ABAP 程序的详细步骤试读版
- 学习记录[email protected]一文搞懂canvas
- Apache kylin Adventure
- 任务 输出密雪冰城主题曲 0612
- Design concept of ORM framework
- go net库(待续)
- jupyter notebook新环境快捷方式
- < 山东大学软件学院项目实训 > 渲染引擎系统——辐射预计算(八)
- [automation] kolla Based Automated Deployment CEPH cluster
- Why doesn't Alibaba recommend MySQL use the text type?
猜你喜欢
Let's talk about events. Listen to those things. - Part one
Project training of Software College of Shandong University rendering engine system basic renderer (6)
The common hand, the original hand and the excellent hand from the sum of Fibonacci sequence
Task output: dense snow ice city theme song 0612
Step by step to create a trial version of ABAP program containing custom screen
How to use grafana to easily realize OVL data visualization
Apache Kylin 历险记
redis 通用命令
一步步创建包含自定义 Screen 的 ABAP 程序的详细步骤
聊聊事件监听那些事-上
随机推荐
从斐波那契数列求和想到的俗手、本手和妙手
Office VR porn, coquettish operation! The father of Microsoft hololens resigns!
File uploading and downloading in SSM
FPGA (III) trigger and latch
Interface.
IGMP message (tcp/ip details volume 1/ Volume 2)
Project training of Software College of Shandong University rendering engine system basic renderer (III)
Escape rules and examples of go
5g new scheme! Upgrade the existing base station and UE simulator to 5g millimeter wave band
Introduction and download website of common data of GIS, remote sensing, hydrology and Geography (2), supplementary~
Writing code can also be classified as "manual" or "vulgar", and we should be good at finding good hands!
CUDA out of memory 或 BrokenPipeError: [Errno 32] Broken pipe 或 OSError: [WinError 1455] 页面文件太小的解决办法
The small flying page is upgraded to be intelligent and the bug repair is faster
Saga体系结构模式:微服务架构下跨服务事务的实现
Find the number of cells (connectivity map, wide search, deep search)
UE4 常用类型转换
记一篇IT培训日记067-好人感恩,坏人无错
How to use grafana to easily realize OVL data visualization
Axure RP 9 for Mac(交互式产品原型设计工具)中文版
【周赛复盘】LeetCode第80场双周赛