Introduction
Point-in-time recovery helps you restore your database to a specific moment, so you can fix mistakes or recover lost data without losing everything.
mysqlbinlog [options] binlog-files | mysql -u user -p database_name
mysqlbinlog --start-datetime='2024-06-01 10:00:00' --stop-datetime='2024-06-01 10:30:00' binlog.000001 | mysql -u root -p mydatabasemysqlbinlog --stop-datetime='2024-06-01 09:45:00' binlog.000001 | mysql -u root -p mydatabasemysqlbinlog --start-datetime='2024-06-01 08:00:00' --stop-datetime='2024-06-01 08:15:00' /var/log/mysql/mysql-bin.000003 | mysql -u root -p mydatabasemysqlbinlog from a binary log file named binlog.000001 starting at '2024-06-01 10:00:00'?--start-datetime.--start-datetime correctly. Options B, C, and D use incorrect or non-existent flags.mysqlbinlog --start-datetime='2024-06-01 09:00:00' --stop-datetime='2024-06-01 10:00:00' binlog.000002 | mysql -u root -p--start-datetime and --stop-datetime to limit the replay of changes between 9 AM and 10 AM on June 1, 2024.mysqlbinlog --start-datetime='2024-06-01 08:00:00' --stop-datetime='2024-06-01 07:00:00' binlog.000003 | mysql -u root -p--stop-datetime is set to '2024-06-01 07:00:00', which is before the --start-datetime '2024-06-01 08:00:00'. This is logically incorrect.mysqlbinlog with --start-datetime at backup time and --stop-datetime at recovery time to replay changes correctly.Pass the test and this pattern moves unknown