关闭

mysql error1215

746人阅读 评论(0) 收藏 举报
分类:


You have a foreign key constraint operating in both directions. When you're creating the tables the first to be created will fail because the second doesn't exist. I'm not even sure that MySQL will accept a circular reference like this. You should probably remove the foreign key constraint applied to mydb.store

However, if this is essential you can ask MySQL to ignore the foreign key checks while you create the table. Just execute

SET foreign_key_checks = 0;

before you create the tables and

SET foreign_key_checks = 1;

after you finish

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:402372次
    • 积分:5182
    • 等级:
    • 排名:第5680名
    • 原创:120篇
    • 转载:218篇
    • 译文:6篇
    • 评论:17条
    文章分类
    最新评论