In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to recover mysql database data deletion, Xiaobian thinks it is quite practical, so share it with you as a reference, I hope you can gain something after reading this article.
Sometimes mysql performs a wrong update or delete, resulting in a large number of data error recovery methods. No transactions are opened and no data is processed. This is when you need to use the sqlbinlog tool.
sqlbinlog needs to be opened, and the specific opening method will not be mentioned.
Using sqlbinlog produces bin files that are required for recovery. The file records all operations of the database. (The operation of this method is to re-execute the statement executed before the database to achieve the recovery effect)
Specific steps:
1, first find the bin file, usually in the mysql data folder, ending in the form of.00000X.
2. Find the time point to restore. Use the statement mysqlbinlog file name (MySQLbinlog xxbin.000001) to view the content, and then find the corresponding specific time.
3. Export sql statement, use mysqlbinlog filename>sql file path example (mysqlbinlog xxxbin,00001>> a.sql| mysql -u root -p )
If you need to export--start--date -stop =''--date ='' at a specified time to export the statement executed at the specified time example (sqlbinlog --start-stop ='2015 -11-22 10:00:00'xxbin.00001> a.sql| mysql -u root -p ) This sentence means to export statements before 10 o'clock on November 22, 2015, whereas start is after the export time. Start and stop can be used simultaneously.
If multiple bin files exist, export as needed.
4, use mysql to execute the exported statement once.
About mysql database data deletion how to restore to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.