In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.