InnoDB: Cannot open table xxx/xxx from the internal data dictionary of InnoDB though the .frm file

遇到以下报错:

[Warning] InnoDB: Cannot open table 
xxx/xxx from the internal data dictionary of InnoDB though the .frm file for the table exists. 
Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.

[ERROR] InnoDB: 
Table `xxx`.`xxx` does not exist in the InnoDB internal data dictionary though MySQL is trying to drop it. 
Have you copied the .frm file of the table to the MySQL database directory from another database? 
Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.

据官方解释是数据字典不同步(out-of-sync data dictinary),原因是数据目录里有.frm文件,但是没有对应的数据字典信息以及数据文件,解决方法是删除掉相关表的.frm文件。
实际环境中为什么会出现这个报错已经无从考据了,确认该表已经没用,将.frm文件清理。

你可能感兴趣的:(MySQL)