当前位置:网站首页>利用mysql-binlog恢复数据
利用mysql-binlog恢复数据
2022-04-23 06:15:00 【小安灬】
1、数据准备
1、数据如下:共28条记录
2、模拟删除:DELETE FROM sys_dict_data WHERE dict_type=‘sys_oper_type’
2、使用binlog恢复数据
binlog内容查看
1、使用show binlog events:不怎么友好,可以参考第二种
2、使用 mysqlbinlog
1、通过binlog获取内容并输出到文件
-d: 根据数据库的名称筛选日志
-o:跳过前N行日志
-r, --result-fil: 把日志输出到指定文件
–start-datetime: 读取指定时间之后的日志,时间格式:yyyy-MM-dd HH:mm:ss
–stop-datetime: 读取指定时间之前的日志,时间格式:yyyy-MM-dd HH:mm:ss
–start-position: 从指定位置开始读取日志
–stop-position: 读取到指定位置停止
–base64-output:在row格式下,显示伪sql语句
-v, --verbose:显示伪sql语句,-vv可以为sql语句添加备注
2、通过查看sql,反解析出insert的sql语句进行恢复
版权声明
本文为[小安灬]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_17522211/article/details/120206553
边栏推荐
- Cmder Chinese garbled code problem
- Error in multi machine and multi card training
- 【点云系列】Pointfilter: Point Cloud Filtering via Encoder-Decoder Modeling
- Draw margin curve in arcface
- Are realrange and einsum really elegant
- Pep517 error during pycuda installation
- pth 转 onnx 时出现的 gather、unsqueeze 等算子
- AUTOSAR从入门到精通100讲(五十二)-诊断和通信管理功能单元
- AUTOSAR从入门到精通100讲(八十一)-AUTOSAR基础篇之FiM
- PyTorch 17. GPU concurrency
猜你喜欢
Chapter 5 fundamentals of machine learning
【点云系列】Multi-view Neural Human Rendering (NHR)
1.1 pytorch and neural network
Résolution du système
Modifying a column with the 'identity' pattern is not supported
机器视觉系列(01)---综述
广西电网|应急空天一体化通信系统方案
Unwind 栈回溯详解
公专融合对讲机是如何实现多模式通信下的协同工作?
带低压报警的51单片机太阳能充电宝设计与制作(完整代码资料)
随机推荐
各类日期转化的utils
安装 pycuda 出现 PEP517 的错误
自组网灵活补盲|北峰油气田勘测解决方案
GIS实战应用案例100篇(五十一)-ArcGIS中根据指定的范围计算nc文件逐时次空间平均值的方法
PyTorch 19. PyTorch中相似操作的区别与联系
基于open mv 搭配stm32循迹
MySQL installation and configuration - detailed tutorial
基于51单片机的温湿度监测+定时报警系统(c51源码)
ARMCC/GCC下的stack protector
PyTorch 18. torch. backends. cudnn
Draw margin curve in arcface
Pep517 error during pycuda installation
美摄科技推出桌面端专业视频编辑解决方案——美映PC版
《Multi-modal Visual Tracking:Review and Experimental Comparison》翻译
imx6ull-qemu 裸机教程2:USDHC SD卡
Chapter 1 numpy Foundation
防汛救灾应急通信系统
ECDSA 签名验证原理及C语言实现
以智能生产引领行业风潮!美摄智能视频生产平台亮相2021世界超高清视频产业发展大会
初探智能指针之std::shared_ptr、std::unique_ptr