How to recover just deleted rows in mysql?

前端 未结 8 805
长情又很酷
长情又很酷 2020-12-01 04:24

Is it possible to restore table to last time with data if all data was deleted accidentally.

相关标签:
8条回答
  • 2020-12-01 05:07

    Sort of. Using phpMyAdmin I just deleted one row too many. But I caught it before I proceeded and had most of the data from the delete confirmation message. I was able to rebuild the record. But the confirmation message truncated some of a text comment.

    Someone more knowledgeable than I regarding phpMyAdmin may know of a setting so that you can get a more complete echo of the delete confirmation message. With a complete delete message available, if you slow down and catch your error, you can restore the whole record.

    (PS This app also sends an email of the submission that creates the record. If the client has a copy, I will be able to restore the record completely)

    0 讨论(0)
  • 2020-12-01 05:13

    Unfortunately, no. If you were running the server in default config, go get your backups (you have backups, right?) - generally, a database doesn't keep previous versions of your data, or a revision of changes: only the current state.

    (Alternately, if you have deleted the data through a custom frontend, it is quite possible that the frontend doesn't actually issue a DELETE: many tables have a is_deleted field or similar, and this is simply toggled by the frontend. Note that this is a "soft delete" implemented in the frontend app - the data is not actually deleted in such cases; if you actually issued a DELETE, TRUNCATE or a similar SQL command, this is not applicable.)

    0 讨论(0)
提交回复
热议问题