MySQL Point-in-time data recovery test steps-based on position

Source: Internet
Author: User

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

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.