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

Record an erroneous deletion of specified data from the database-& the lesson of gt; blood

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

The query of select was supposed to be carried out, but the command of delete was accidentally executed, resulting in all the data of unitID=100004 being deleted.

This is awkward. This is an online database. Check the binlog log and expect it to be restored.

Fortunately, the company's database uses Aliyun's RDS database with data tracking.

Then enter the task name and the time period of the misoperation at that time. Remember: the operation must be done within 60 minutes.

When searching for logs, you can specify fields and then select to view details.

After viewing the details of all mistakenly deleted operations, the change statement in the following chart is a command executed by misoperation, and then there will be a rollback statement at the bottom. If there are multiple deleted list of details, you need to copy and paste all the rollback statements and execute the rollback statement in the database.

At this point, the data is basically restored, and then select * from xsl_user_unit_rols where unitID='100004' is executed.

Ok data has come back perfectly.

If you have learned a lesson, you will only remember it more deeply, so be sure to back up and operate carefully when you operate the database.

Https://help.aliyun.com/document_detail/63780.html, this is the link to the official document of Aliyun.

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