MySQL: problems creating foreign keys
Things to check:
1. Do you have incompatible types of keys (for example, your foreign key is bigint and reference key is integer(11))
2. Do you have different engines specified for your tables? (for example, parent MyISAM and child InnoDB)
3. Is the column charset of both foreign and reference key the same? e.g. utf8 and utf8, not utf8 and latin1
4. Do the the columns in the foreign key relation have same SIGNED/UNSIGNED attribute?