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