Delete a Crashed Innodb table

I cannot delete/drop a crashed Innodb table. I get the following error:

ERROR 1051 (42S02): Unknown table ‘accounts’

And if I want to create it I get the following error:

ERROR 1005 (HY000): Can’t create table ‘accounts’ (errno: -1)

This happens on my server after an accidental power failure.

----------------------

Simple solution that worked for me.

Try to delete the table.

>drop table tableName;

You will see error:

ERROR 1051 (42S02): Unknown table 'tableOne'
Copy the create statement of that table from another Database or write it.

>CREATE TABLE tableName ( ID int(11) NOT NULL, LOCKED tinyint(1) NOT NULL) ENGINE=InnoDB;

Successful

Query OK, 0 rows affected (0.03 sec)
Drop the table

>drop table tableName;
Successful

Tags