我不小心删除了测试表的.frm文件。问题是我不能删除此表并将其从information_schema中删除。
select * from information_schema.tables where table_name like 'testtesttest';
+---------------+--------------+--------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------+
| TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | ENGINE | VERSION | ROW_FORMAT | TABLE_ROWS | AVG_ROW_LENGTH | DATA_LENGTH | MAX_DATA_LENGTH | INDEX_LENGTH | DATA_FREE | AUTO_INCREMENT | CREATE_TIME | UPDATE_TIME | CHECK_TIME | TABLE_COLLATION | CHECKSUM | CREATE_OPTIONS | TABLE_COMMENT |
+---------------+--------------+--------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------+
| def | report | testtesttest | BASE TABLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Can't find file: './report/testtesttest.frm' (errno: 13) |
+---------------+--------------+--------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+----------------------------------------------------------+
drop table report.testtesttest;
ERROR 1051 (42S02): Unknown table 'testtesttest'
有没有办法告诉mysql这样的表不再存在?
答案 0 :(得分:3)
看起来以下步骤有帮助: