mysql导入数据库报错ERROR 1005 xxxxxx (errno: -1)

导入 数据库出现下面提示错误:
ERROR 1005 (HY000) at line 1727: Can't create table 'xxxxxxx' (errno: -1)
查看日志会有以下报错:
120912 20:24:42 InnoDB: Error creating file './xxxxxx.ibd'.
120912 20:24:42 InnoDB: Operating system error number 17 in a file operation.
InnoDB: Error number 17 means 'File exists'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: The file already exists though the corresponding table did not
InnoDB: exist in the InnoDB data dictionary. Have you moved InnoDB
InnoDB: .ibd files around without using the SQL commands
InnoDB: DISCARD TABLESPACE and IMPORT TABLESPACE, or did
InnoDB: mysqld crash in the middle of CREATE TABLE? You can
InnoDB: resolve the problem by removing the file './xxxxxxxxx.ibd'
InnoDB: under the 'datadir' of MySQL
 
从报错日志可以看到解决方法:
InnoDB: resolve the problem by removing the file './xxxxxxx.ibd'
所以只要移除'./xxxxxxxx.ibd'这个文件即可
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值