Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql5.7INNODB specified date data recovery method

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following is about the mysql5.7INNODB specified date data recovery method, the secret of the text is close to the topic. So, no gossip, let's go straight to the following, I believe you will benefit from reading this article on the method of data recovery on a specified date in mysql5.7INNODB.

1: find the binlog directory

2: use the mysqlbinlog command to extract the time period in binlog and export it to sql file.

Mysqlbinlog-- start-datetime= "2016-08-11 17:19:00"-- stop-datetime= "2016-09-01 20:00:00" / data/mysql/data/mysql-bin.000003 >. / restore_db.sql

3: after you get the sql file, you can restore it. The above-- start-datetime is the start time,-- stop-datetime is the end time, or-- start-position-stop-position can be used to be more precise.

4: restore: back up your database before operation. It can be recovered in time in case of an accident.

Mysql-u root-p log in to the database

Attention! Using this file to restore the database is different from the usual recovery, binlog records which database was modified, so, using this file to restore, the goal can not be defined. For example, there are three databases: a, b, and c, and only a has a data problem. I don't think it is possible to restore an alone, which includes the operation of the data of b ~ ~ C. The same changes will be made to the BBM c data. Remember. The best way is to back up and operate on another machine.

Mysql > source / path/restore_db.sql (path represents the path)

The time of execution depends on the size of the file. Wait patiently. After a while, the data recovery is complete.

For the above mysql5.7INNODB specified date data recovery method related to the content, is there anything you do not understand? Or if you want to know more about it, you can continue to follow our industry information section.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report