Docs/数据库/mysql/mysql二进制日志相关
2022-10-18 16:59:37 +08:00

16 lines
No EOL
653 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

二进制文件的字段说明
1、事件发生的日期和时间
2、服务器id
3、时间结束位置
4、事件类型
5、原服务器生成此事件时的线程id查看线程 [交互]show processlist
6、语句的时间戳和写入二进制文件的时间差
7、错误代码
8、事件内容
9、时间位置相当于下一个事件
查看二进制文件 mysqlbinlog binlogfile
查看日志偏移点 [交互]show master status;
二进制日志滚动 [交互]flush logs;
查看从指定偏移开始的日志 mysqlbinlog --start-position=偏移量 binlogfile
查看指定事件的日志 [交互]show binlog events in logfile