我有一个名为order_line的innodb表,我想截断它。 我收到的消息是来自存储引擎的错误-1,我的表完全丢失了! 幸运的是,这是我的开发环境,而不是生产!
如何取回桌子? 我的磁盘空间是14 GB,这不是问题
请帮忙!
这是我的日志文件所说的:
Version: '5.6.11' socket: '' port: 3308 MySQL Community Server (GPL) 2013-09-16 12:41:47 134c InnoDB: Operating system error number 5 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. It may also be you have created a subdirectory InnoDB: of the same name as a data file. 2013-09-16 12:41:47 134c InnoDB: File name .\shopping\orderline.ibd 2013-09-16 12:41:47 134c InnoDB: File operation call: 'create' returned OS error 105. 2013-09-16 12:41:47 134c InnoDB: Operating system error number 5 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. It may also be you have created a subdirectory InnoDB: of the same name as a data file. 2013-09-16 12:41:47 3220 [ERROR] InnoDB: Cannot create file '.\shopping\orderline.ibd' 2013-09-16 12:41:47 3220 [ERROR] InnoDB: TRUNCATE TABLE shopping/orderline failed to create a new tablespace 2013-09-16 12:41:47 134c InnoDB: cannot calculate statistics for table "shopping"."orderline" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html
答案 0 :(得分:0)
运行以下命令
ALTER TABLE orderline DISCARD TABLESPACE
DROP TABLE orderline
CREATE TABLE OrderLine (
Your Table Field definitions here
) ENGINE=InnoDB DEFAULT CHARSET=utf8
改变表& Drop Table会出错,但会从数据字典中删除表。
确保您具有访问Mysql5 / Data /目录的权限