mysqlbinlog解析

安装mysql后在bin文件夹下搜索mysqlbinlog.exe,用cmd执行以下命令

powershell 复制代码
mysqlbinlog --no-defaults --base64-output=decode-rows 
-vv C:\Users\Desktop\mysql-bin.001914 > C:\Users\Desktop\output14.sql
  • --no-defaults:不要读取任何选项文件。如果由于从选项文件中读取未知选项而导致程序启动失败,可以使用 --no-defaults 来防止它们被读取
  • --database:只列出该数据库下的行数据,但无法过滤 Rows_query_event。
  • --base64-output=decode-rows -vv:显示具体 SQL 语句。
  • --skip-gtids=true:忽略GTID 显示。
  • --start-datetime:时间范围 ,起始时间。
  • --stop-datetime:时间范围 ,结束时间。
  • C:\Users\Desktop\mysql-bin.001914:binlog文件地址
  • C:\Users\Desktop\output14.sql:将结果导入到日志文件,方便查看。

binglog日志解析命令官网地址:https://dev.mysql.com/doc/refman/8.0/en/mysqlbinlog.html

相关推荐
码熔burning7 小时前
MySQL 8.0 新特性爆笑盘点:从青铜到王者的骚操作都在这儿了!(万字详解,建议收藏)
数据库·mysql
猫头虎7 小时前
2025最新OpenEuler系统安装MySQL的详细教程
linux·服务器·数据库·sql·mysql·macos·openeuler
alonewolf_9914 小时前
MySQL索引优化实战二:分页、关联查询与Count优化深度解析
数据库·mysql
高溪流16 小时前
3.数据库表的基本操作
数据库·mysql
alonewolf_9917 小时前
深入剖析MySQL锁机制与MVCC原理:高并发场景下的数据库核心优化
数据库·mysql
黄宝康17 小时前
sqlyog密钥亲测有效
mysql
YIN_尹17 小时前
【MySQL】数据类型(上)
android·mysql·adb
想唱rap18 小时前
MYSQL在ubuntu下的安装
linux·数据库·mysql·ubuntu
java1234_小锋18 小时前
MySQL中的乐观锁和悲观锁是什么?
mysql
齐 飞19 小时前
快速删除mysql表中所有数据-TRUNCATE TABLE
数据库·mysql