I accidentally deleted some huge number of rows from a table…
How can I roll it back?
I executed the query using PuTTY.
I’ll be grateful if any of you can guide me safely out of this…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you didn’t commit the transaction yet, try
rollback. If you have already committed the transaction (by manually execitingcommitor by exiting the command line client or when the optionautocommitis1which is the default), you must restore the data from your last backup.To prevent things like that in the future, use
SET autocommit=0before any dangerous work. Any changes will be kept inside of your current transaction until you commit them. See https://dev.mysql.com/doc/refman/8.0/en/innodb-autocommit-commit-rollback.html for details