简体   繁体   中英

Undo update in mysql, data still in .myd file

I did the classical stupid mistake and I updated rows in MySQL table without WHERE condition (via PHP script), so all rows are affected. I don't have any recent backup.

I can still see the data before the update in .myd file.

I thought of copying and pasting the data back, but the problem is, the data wasn't in english, and if I open the .myd in notepad, non-english characters look "damaged" (they were fine in mysql, I was using utf8_unicode_ci).

So, is there any chance to get the data back in correct encoding? Or can I somehow edit out the update from the .myd file?

seems duplicated with How to rollback the effect of last executed mysql query

don't edit mysql binary file, copy them if you want it to help making queries to updates columns to desired state.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM