The accepted answer is not always correct. If you configure binary logging on MySQL, you can rollback the database to any previous point you still have a snapshot and binlog for.
7.5 Point-in-Time (Incremental) Recovery Using the Binary Log is a good starting point for learning about this facility.