Forum Moderators: coopster
[mysql.com...]
the other option is to restore from the most recent backup
1) Create an empty copy of the table with a new table name.
2) Use your favorite method to pull out all the SQL INSERT, UPDATE and DELETE statements for the original table and put them in their own file. (I wrote a Perl script for this myself; regular expressions are your friend.)
3) Remove the bad statement(s) from your new SQL file.
4) Change the original table name to the copy's table name.
5) Run your SQL file:
mysql -p -u <username> < file.sql RENAME TABLE original TO original_bad; RENAME TABLE copy TO original; Should be good to go after that...