MySQL Retrieve the wrong data deleted

Source: Internet
Author: User

Scenario: In our development phase, it is often necessary to have some test data when we test the relevant functions. Late due to the introduction of formal data, but the test data has not been cleaned up in time. This time because of a mistake to delete, resulting in some formal data is deleted, thus, a search for data after the process began ...

Solution:

1) through the daily backup of the log to find, but unfortunately, we are not formally on-line, so the database backup script has not been implemented, so blocked

2) Because of these data I am using the way the script to run the task every day to brush into the data, so, have recorded the corresponding log, will be the entire process of printing out, so, began to find the corresponding log file, but unfortunately, that data is manually executed, no corresponding data redirected to the log file , the story is this dog blood!!!

3) There is no other way, only the use of powerful mysqlbinlog tools

Conditions:

1. Make sure your Binlog function is turned on, because the default is not to open after MySQL is installed, so you can check whether it is turned on

If on is on, it will show off if it is not turned on

2. If the case is open

A file similar to this will be found in the appropriate directory:

3. Restore the required files because you directly open the binary content that will be displayed

      

Mysqlbinlog  C:\Users\Administrator\Desktop\mysql-bin.000042 > Mysql_restore.sql//mysql_ Restore.sql parsing the SQL file

  

Common errors:

1)

Solution:--no-defaults

MySQL Retrieve the wrong data deleted

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.