Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们如何从一个 binlog 文件中创建一个数据库恢复日期,例如“周日到周三”?
谢谢, 佩德罗
您可以使用mysqlbinlog. 要指定开始和结束日期,请使用--start-datetimeand--stop-datetime参数;它们记录在mysqlbinlogMySQL 手册的页面上。
mysqlbinlog
--start-datetime
--stop-datetime
您需要首先恢复您要恢复到的点之前的最后一个完整备份。然后从该点重放二进制日志(备份可能应该已创建包含二进制日志位置 - 如果不是,您将不得不尝试解决它)直到您要恢复到的点。