mysqlbinlog --database=database name --start-date="2017-06-01 5:00:00" --stop-date="2017-06-11 10:00: 00" var/mysql-bin.000001 | mysql -u root -p123456 -f
1. Pay attention to the location of the executable file in bold. If you have added the environment variable, you can ignore it
2. Pay attention to the correct position of the red word bin-log log
3. The database name needs to be changed
4. You can set the date
5. Finally set the database account and password used
The above is the detailed content of Data recovery of mysql through bin-log. For more information, please follow other related articles on the PHP Chinese website!