innodb修复:InnoDB 中文参考手册 --- 15 故障检测与修复来源: 发布时间:星期五, 2008年9月26日 浏览:51次 评论:0
15 故障检测与修复
15.1 发现并修复数据字典错误的操作一个特殊的有关表的问题就是 MySQL 在它自己的数据目录下的 .frm 文件中保存它自己的数据字典信息,然而 InnoDB 将它自己的信息保存在数据文件中 InnoDB 自己的数据字典中。如果你在外部移走了 与数据字典 out-of-sync 的一个故障现象就是 InnoDB: Error: table test/parent already exists in InnoDB internal InnoDB: data dictionary. Have you deleted the .frm file InnoDB: and not used DROP TABLE? Have you used DROP DATABASE InnoDB: for InnoDB tables in MySQL version <= 3.23.43? InnoDB: See the Restrictions section of the InnoDB manual. InnoDB: You can drop the orphaned table inside InnoDB by InnoDB: creating an InnoDB table with the same name in another InnoDB: database and moving the .frm file to the current database. InnoDB: Then MySQL thinks the table exists, and DROP TABLE will InnoDB: succeed.你可以跟从上面错误日志中的提示移除(drop)孤表(orphaned table)。
另一个与数据字典 out-of-sync 的故障现象就是 MySQL 提示不能打开一个文件 yourtablename.InnoDB 的错误。 ERROR 1016: Can\'t open file: \'child2.InnoDB\'. (errno: 1)在错误日志中可以发现: InnoDB: Cannot find table test/child2 from the internal data dictionary InnoDB: of InnoDB though the .frm file for the table exists. Maybe you InnoDB: have deleted and recreated InnoDB data files but have forgotten InnoDB: to delete the corresponding .frm files of InnoDB tables?意思就是有一个孤的(orphaned) .frm 文件,在 InnoDB 中没有相应的表与之对应。可以通过手工删除 .frm 文件来移除它。
如果在一个 如果在表空间内存在一个孤表(orphaned table) 0
相关文章
读者评论
发表评论 |