我在一个名为“e_learning_resource_prelive”的mysql数据库中损坏了“sessions”表(或其他原因)。通常情况下这不是问题,因为我可以回到数据库的备份。然而,这个损坏的表似乎阻止我删除数据库:
> mysqladmin -u root drop e_learning_resource_prelive
Dropping the database is potentially a very bad thing to do.
Any data stored in the database will be destroyed.
Do you really want to drop the 'e_learning_resource_prelive' database [y/N] y
mysqladmin: DROP DATABASE e_learning_resource_prelive failed;
error: 'Unknown table 'sessions''
当我进入数据库时,会在show_tables中显示sessions表(它是唯一存在的,mysqladmin drop命令已经删除了其他表),但我无法删除它:
mysql> show tables;
+---------------------------------------+
| Tables_in_e_learning_resource_prelive |
+---------------------------------------+
| sessions |
+---------------------------------------+
1 row in set (0.00 sec)
mysql> drop table sessions;
ERROR 1051 (42S02): Unknown table 'sessions'
有人能告诉我如何删除这个表或整个数据库吗? 我需要删除数据库,然后从备份转储中重新构建它。