Original: http://blog.csdn.net/qq_15058425/article/details/61196085
1. Start Mysqlbinlog log function
First look for the location of the my.cnf file:
2, edit the my.cnf file, add the following, and then press ECS, Wq save exit
3, so the Mysqlbinlog function is opened. Restore the database based on MySQL log
4. View the log files, my log files in the data directory of the database files:
5, through the Mysqlbinlog to view the contents of the log file:
A. Find the Mysqlbinlog directory first
B. View the log file in this directory:
Log file:
Such log files in addition to creating tables and delete the table of SQL, the operation of the database statements are encrypted, to see the specific SQL, with the following command:
Log file:
6. Restore the database according to the point of time:
Currently the records in the in table in my ZZ database have been deleted and the database is now recovered based on location:
View the latest logs, 18
Where to insert the table:
Where the last record commits:
Perform the recovery according to these two places:
View database: Restore success:
Recovery by point in time:
The same effect, complete!
(GO) mysql5.7 restore the database Linux based on the mysqlbinlog binary file