假设有三张表user,food,form。其中form表有两个外键参照user表和food表的主键id。外键建不起来可以通过修改表的引擎试试:
alter table user engine=innodb;
alter table food engine=innodb;
create table form (id int,userId int,foodId int,foreign key (userId) references user(id),foreign key (foodId) references food(id)) engine=innodb;