ERROR [HY000][1822]: Failed to add the foreign key constraint.

很普通的一个添加外键出错的错误

确保被指向的字段在另一个表中是主键

确保两个字段的约束条件一致

原文地址:https://www.cnblogs.com/mirage-mc/p/12627305.html