MySQL 5.5 errno: 150 “Foreign key constraint is incorrectly formed”

前端 未结 3 1626
独厮守ぢ
独厮守ぢ 2021-01-16 20:25

There are plenty of questions regarding this error but I can\'t seem to find any similar scenario to what I have.

My 1st table (users):

My 2nd table

3条回答
  •  死守一世寂寞
    2021-01-16 20:38

    Since the columns are of the same type, it's worth to check the engine type as @Tim Biegeleisen suggested.

    Changing engine type fixed the issue.

    ALTER TABLE users
    ENGINE=InnoDB;
    

提交回复
热议问题