Search code examples
mysqldatabase-restore

mysql how to restore data for part of a table


Let's say I have table A, it has 3000 rows and I know the first 2000 rows are corrupt and I have a clean records sitting in another mysql server. What would be the easiest way to restore that 2000 rows? Thanks so much.


Solution

  • Using Maatkit's mk-table-checksum tool you can determine the differences between the tables of two hosts.

    mk-table-sync is used to generate and/or run only the statements necessary to update the corrupted table.