MyISAM Table Maintenance and Crash Recovery The command recovers all the transactions from the starting position until just before the stop position. Because the output of  mysqlbinlog  includes  SET TIMESTAMP  statements before each SQL statement recorded, the recovered data and related MySQL logs reflect the original times at which the transactions were executed. Your database has now been restored to the point-in-time of interest,  t$_{p}$ , right before the table pets.cats  was dropped. Your database has been restored the latest statement recorded in the binary log file, but with the selected event skipped. This section discusses how to use  myisamchk  to check or repair  MyISAM  tables (tables that have  .MYD and  .MYI  files for storing data and indexes). For general  myisamchk  background, see Section 4.6.4, “myisamchk — MyISAM Table-Maintenance Utility” . Other table-repair information can be found at Section 2.11.13, “Rebuilding or Repairing Tables or Indexes” . You can use  myisamchk  to check, repair, or optimize database tables. The following sections describe how to perform these operations and how to set up a table maintenance schedule. For information about using  myisamchk  to get information about your tables, see Section 4.6.4.5, “Obtaining Table Information with myisamchk” . Even though table repair with  myisamchk  is quite secure, it is always a good idea to make a backup before  doing a repair or any maintenance operation that could make a lot of changes to a table. myisamchk  operations that affect indexes can cause  MyISAM FULLTEXT  indexes to be rebuilt with full-text parameters that are incompatible with the values used by the MySQL server. To avoid this problem, follow the guidelines in Section 4.6.4.1, “myisamchk General Options” . MyISAM  table maintenance can also be done using the SQL statements that perform operations similar to what  myisamchk  can do: 7.6 MyISAM Table Maintenance and Crash Recovery •To check  MyISAM  tables, use  CHECK TABLE . •To repair  MyISAM  tables, use  REPAIR TABLE . •To optimize  MyISAM  tables, use  OPTIMIZE TABLE . •To analyze  MyISAM  tables, use  ANALYZE TABLE . For additional information about these statements, see Section 13.7.3, “Table Maintenance Statements” . These statements can be used directly or by means of the  mysqlcheck  client program. One advantage of these statements over  myisamchk  is that the server does all the work. With  myisamchk , you must 1630 4. Beyond the point-in-time recovery that has been finished, if you also want to reexecute all the statements  after  your point-in-time of interest, use  mysqlbinlog  again to apply all the events after t$_{p}$  to the server. We noted in step 2 that after the statement we wanted to skip, the log is at position 355; we can use it for the  --start-position  option, so that any statements after the position are included: shell>  mysqlbinlog --start-position=355 /var/lib/mysql/bin.123456 \ | mysql -u root -p shell>  mysqlbinlog --start-position=155 --stop-position=232 /var/lib/mysql/bin.123456 \ | mysql -u root -p