Cannot add foreign key constraint

Cannot add foreign key constraint

目前出现这种情况的只有这一种情况:

两个表内的数据类型不一样,我的错误出现在一个表的字段类型是int,另一个是bigint类型,然后导致主从表不能设置外键。

参考博客

原文地址:https://www.cnblogs.com/chenyameng/p/13360730.html