[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 438
  • Last Modified:

Undo upate command of mysql database

     
Hi there,        

I have accidentally updated my mysql table in all the rows, while my intension was just to update one row. I need help to undo the update command and get my old data back. Thanks a lot.
0
idOle
Asked:
idOle
  • 3
2 Solutions
 
gamebitsCommented:
If you dont have a backup file somewhere I'm affraid you are out of luck.

Gamebits
0
 
todd_farmerCommented:
I agree with gamebits.  Hopefully, you have a backup.  This is also one reason to use transactional tables (InnoDB) and work with autocommit off - so you can rollback changes.  Sorry there's not a better answer.
0
 
idOleAuthor Commented:
Would you please tell me how to turn autocommit off, since I just change my table to type InnoDB. Thanks.
0
 
todd_farmerCommented:
SET AUTOCOMMIT=0

There's some good information on transactions that you will want to read here:

http://dev.mysql.com/doc/refman/4.1/en/commit.html
0
 
todd_farmerCommented:
Thanks for the points - sorry there isn't a better answer.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now