立即学习:https://edu.csdn.net/course/play/27328/370721?utm_source=blogtoedu
#查看所有二进制日志列表
show master logs;
#查看正在使用的二进制日志
show master status;
#刷新日志(重新来时新的binlog日志文件)
flush logs;
#查询指定的binlog
1. mysql界面运行:show binlog events in ' DESKTOP-GD38VDB-bin.000001'\G;
2. cmd运行
mysqlbinlog -v --base64-output=decode-rows "E:\mysql\Data\DESKTOP-GD38VDB-bin.000001"
#导出恢复数据用的sql
cmd运行:mysqlbinlog "E:\mysql\Data\DESKTOP-GD38VDB-bin.000001" --start-position 528 --stop-position 1191 > e:\mysql\backup\xxxx.sql