Is there any option to restore data after deleting from a MySQL table
772
There are some rows in a table, by mistakenly I had deleted all rows from the table and data got commited. So is there any way to restore data for that table.
If you had replication (or binary logging) enabled (log-bin option), then you could recover your data (or part of them) by replaying binary logs.
If you have some backup (and recorded binary log position from time of backup), you need recover a backup and then replay logs from position, when backup was taken.
If you had replication (or binary logging) enabled (
log-bin
option), then you could recover your data (or part of them) by replaying binary logs.If you have some backup (and recorded binary log position from time of backup), you need recover a backup and then replay logs from position, when backup was taken.
If you don't have a backup, then NO. The data is lost.
I suggest you learn about the
--i-am-a-dummy
-option and turn off autocommit.