要导出 MySQL binlog 日志并根据时间范围筛选,可以使用 mysqlbinlog 命令的 --start-datetime 和 --stop-datetime 参数。以下是一个示例命令:

mysqlbinlog --start-datetime='YYYY-MM-DD HH:MM:SS' --stop-datetime='YYYY-MM-DD HH:MM:SS' binlog_file > output_file

请将 YYYY-MM-DD HH:MM:SS 替换为起始和结束时间范围。binlog_file 是要导出的 binlog 文件名,output_file 是输出文件名。

要将输出文件中的 Base64 格式转换为正常格式,您可以使用以下命令:

base64 -d input_file > output_file

请将 input_file 替换为要转换的输入文件名,output_file 是转换后的输出文件名。

请注意,导出 binlog 日志和转换 Base64 格式的命令需要在命令行中执行,并确保您具有适当的权限来执行这些操作。

MySQL binlog 导出与时间范围筛选及 Base64 解码

原文地址: https://www.cveoy.top/t/topic/Yzz 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录