I got this while trying to create a foreign key in MySql. Once you see the fix its obvious. My parent table’s primary key was declared as UNSIGNED
while my child table wasn’t. Change one or the other to match and you’re all set. I really which the MySql people would sit down and take a moment to write out better error messages. Something as simple as “datatypes must match” would have really helped me.