In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "the solution that Mysql cannot delete large table leads to DB cannot be deleted". In daily operation, I believe that many people have doubts about the solution problem that Mysql cannot delete large table and DB cannot delete. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubt that "Mysql cannot delete large table leads to DB cannot delete". Next, please follow the editor to study!
Generally speaking, we should have Production, Demo and other environments for each project. We may often clean and synchronize data in the Demo environment. In the case of a large amount of data, sometimes Mysql deletes the table or modifies the table without echoing loading,load for half a day. In addition, we may accidentally press to cancel, resulting in table damage, and so on. At this time, we urgently need to use the environment.
If it is really urgent, it can be done in the following ways:
Assume that the Mysql installation directory is / var/lib/mysql and the DB involved is TEST1
The first step: (delete all files under / var/lib/mysql/test1-> rm-rf / var/lib/mysql/test1/*) or (delete the entire DB directory-> rm-rf / var/lib/mysql/test1)
Step 2: (use test1; show tables will be empty) or (show databases the DB has disappeared). At this time, the information of these tables or DB will still be recorded in the data dictionary. We need to run a script to update the contents of the data dictionary.
Mysql > use mysql; (key)
Mysql > source / usr/share/mysql/mysql_system_tables.sql
Step 3: Finish
At this point, the study on "the solution that Mysql cannot delete a large table and DB cannot be deleted" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.