简体   繁体   English

我无法删除数据库或更改MySQL中的表

[英]I can't drop my database or alter my tables in MySQL

Something weird just happened, I have a database and I dropped the whole DB once since it was practically messy, afterwards, I created it again and managed to find more errors so I dropped it again but this time, the query went on for so long, I had to interrupt it. 发生了一件奇怪的事情,我有一个数据库,并且由于整个数据库很乱而删除了整个数据库,此后,我再次创建它并设法找到更多的错误,因此我再次删除了它,但是这次查询持续了这么长时间,我不得不打断它。 But every time I interrupt it, Workbench crashes instantly. 但是每次我中断它时,Workbench都会立即崩溃。 Afterwhich, I tried altering tables instead but it does the same thing now. 之后,我尝试改为更改表,但是现在它执行相同的操作。 What should I do? 我该怎么办?

Update: I can't drop tables as well now. 更新:我现在也不能删除表。 I think anything related to schema changes makes it hang and load forever. 我认为与架构更改相关的任何事情都会使其永久挂起和加载。 Update: Apparently, I can still perform other normal database operations on other databases just no the one I'm working on though. 更新:显然,我仍然可以在其他数据库上执行其他普通数据库操作,尽管我没有正在执行的操作。 Any ideas? 有任何想法吗?

You probably messed up your schema entirely. 您可能完全弄乱了架构。 Schemas/dbs in MySQL are just folders in the data directory. MySQL中的Schema / dbs只是data目录中的文件夹。 So try removing the folder with the corrupt db (move to a place outside the data folder) and see if things go back to normal. 因此,请尝试删除数据库已损坏的文件夹(移至数据文件夹之外的位置),然后查看情况是否恢复正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM