MySQL创建外键报错ERROR 3780 (HY000): Referencing column ‘user_id’ and referenced column ‘id’ in foreign key constraint ‘fk_user_id’ are incompatible. 原因:两个数据表中创建外键的数据类型不一致 我的错误是一个表是int,一个是bigint,这种的也算做是不一致的 解决办法:将数据类型修改为一致的即可