MySQL Point-in-time data recovery test steps (based on position):
1. View the name and location of the current binary log
Mysql> Show master status;
| master-bin.000001 | 107
2, modify the database information and record the corresponding changes to facilitate recovery after the comparison.
For example, this example inserts data into the TEST.TB1:
+------+-------+
| ID | name |
+------+-------+
| 1 | Tina |
| 2 | Jason |
+------+-------+
3, change the record log information after the adjustment
Mysql> Show master status;
| master-bin.000001 | 590 |
4. Export Binary Data file:
Mysqlbinlog--start-position=107--stop-position=590 master-bin.000001 >f1.sql
5, delete the above data modification section
mysql> Use test
mysql> drop table tb1;
6. Recover deleted data:
MySQL <f1.sql
7. Check if the recovery is successful
The view data has indeed been restored;
Note: The above actions are tested on the mysql5.5.33 environment.
Problem:
MySQL5.6.34 on the Gtid mode to do time-point recovery will be abnormal, how to resolve, left to follow! Has the understanding netizen can give me the message, thanks!
qq:3369358483
This article is from the "Behind" blog, make sure to keep this source http://laozhu.blog.51cto.com/755494/1873442
MySQL Point-in-time data recovery test steps-based on position