ERROR [HY000][1822]: Failed to add the foreign key constraint. 很普通的一个添加外键出错的错误 确保被指向的字段在另一个表中是主键 确保两个字段的约束条件一致