How to undo an executed mysql UPDATE command
P粉464113078
2023-08-22 17:36:22
<p>While trying to make an update to the MySQL server, I accidentally forgot to add an extra WHERE clause that was supposed to edit a row. </p>
<p>More than 3500 lines have now been edited due to my mistake. </p>
<p>I may have a backup, but I've done a lot of work since the last backup and I don't want to waste all that work because of one bad query. </p>
<p>Please tell me if there is any way to solve this problem. </p>
Just a thought - could you restore the backup to a new database and then update that column via a cross-database query, based on the data it once had?
If you've already submitted your transaction, it's time to take out the backup, sorry. But that's what backups are for. I made a similar mistake myself...once.