mysql导出所有binlog_mysql 使用mysqlbinlog命令导出和分析binlog文件

简单执行

话不多说,我们直接上手使用这个命令试下

C:\mysql5715\data>C:\mysql5715\bin\mysqlbinlog.exe --no-defaults --database=test --base64-output=decode-rows -v mysql-bin.000001 >binlog007.sql

WARNING: The option --database has been used. It may filter parts of transactions, but will include the GTIDs in any case. If you want to exclude or include transactions, you should use the options --exclude-gtids or --include-gtids, respectively, instead.

结果被输入到binlog007.sql文件里

/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;

/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;

DELIMITER /*!*/;

# at 4

#210220 13:35:07 server id 1 end_log_pos 123 CRC32 0x4711132f Start: binlog v 4, server v 5.7.15-log created 210220 13:35:07 at startup

# Warning: this binlog is either in use or was not closed properly.

ROLLBACK/*!*/;

# at 123

#210220 13:35:07 server id 1 end_log_pos 154 CRC32 0xda13f808 Previous-GTIDs

# [empty]

# at 154

#210220 13:41:00 server id 1 end_log_pos 219 CRC32 0x0fa7a827 Anonymous_GTID last_committed=0 sequence_number=1

SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/;

# at 219

#210220 13:41:00 server id 1 end_log_pos 291 CRC32 0x31a77419 Query thread_id=3 exec_time=0 error_code=0

SET TIMESTAMP=1613799

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值