Reason for "show tables"; works because mysqld will check the database directory for .frm files only. As long as they exist, he sees the definition of the table.
If you imported data into MySQL and this error message occurred, the first thing I did immediately was run this command: (BTW This is MySQL 5.1.45, but it works in MySQL 5.x anyway)
mysql> show engines; +------------+---------+----------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +------------+---------+----------------------------------------------------------------+--------------+------+------------+ | InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | | CSV | YES | CSV storage engine | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | | ARCHIVE | YES | Archive storage engine | NO | NO | NO | | MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO | +------------+---------+----------------------------------------------------------------+--------------+------+------------+ 8 rows in set (0.00 sec)
If the server you imported the data to says InnoDB is down, you have a big problem. Here is what you should do:
1) Drop all data from the new import server server
2) Clean InnoDB Setup
3) run SHOW ENGINES; and make sure InnoDB is fully functional.
4) Reload mysqldump to the new import server
Give it a try !!!
source share