你的用户权限可以创建表吗 如果回答是肯定的要看错误的详细提示,可以使用命令:(在MySQL Manual里搜索“errno 150”时找到)SHOW ENGINE INNODB STATUS;
//针对用INNODB存储方式的数据库在信息中有一组【LATEST FOREIGN KEY ERROR】会有最近错误的详细描述和解决办法。如:Cannot find an index in the referenced table where the referenced columns appear as the first columns, or column types in the table and the referenced table do not match for constraint.(译:不能在“被reference的表”里找到包含“被reference字段”的索引,或者是两个关联字段类型不匹配)个人解决如下:把两张表的不同数据库类型改为一样的数据类型参考资料:http://hi.baidu.com/jackmawt/blog/item/95e73f8336977499f703a6f6.html本回答被提问者和网友采纳