MySQL:无法建立表格(错误编号:150) [英] MySQL: Can't create table (errno: 150)
本文介绍了MySQL:无法建立表格(错误编号:150)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试导入.sql文件,但该文件创建表失败.
I am trying to import a .sql file and its failing on creating tables.
以下是失败的查询:
CREATE TABLE `data` (
`id` int(10) unsigned NOT NULL,
`name` varchar(100) NOT NULL,
`value` varchar(15) NOT NULL,
UNIQUE KEY `id` (`id`,`name`),
CONSTRAINT `data_ibfk_1` FOREIGN KEY (`id`) REFERENCES `keywords` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
我从同一个数据库中导出了.sql,我删除了所有表,现在我试图导入它,为什么会失败?
I exported the .sql from the the same database, I dropped all the tables and now im trying to import it, why is it failing?
MySQL:无法创建表'./dbname/data.frm'(错误号:150)
MySQL: Can't create table './dbname/data.frm' (errno: 150)
推荐答案
查看全文