--start-position and --stop-position options for mysqlbinlog can be used for specifying log positions.
mysqlbinlog for a range of times near the time when the unwanted transaction was executed, but redirect the results to a text file for examination.
mysqlbinlog --start-date="2007-06-07 7:59:00" \ --stop-date="2007-06-07 8:10:00" \ /var/log/mysql/bin.1234 > /tmp/mysql_restore.sql
log_pos followed by a number.
mysqlbinlog --stop-position="30122" /var/log/mysql/bin.1234 \ | mysql -u root -p mysqlbinlog --start-position="30125" /var/log/mysql/bin.1234 \ | mysql -u root -p
mysqlbinlog includes SET TIMESTAMP statements before each SQL statement recorded, the recovered data and related MySQL logs will reflect the original times at which the transactions were executed.
How do I do table maintenance?
© 2007 John Michael Pierobon