When I'm trying to create a foreign key linked to a primary key in another table I get:
#1452 - Cannot add or update a child row: a foreign key constraint fails
(`fayer`.`#sql-225c_1d3`, CONSTRAINT `#sql-225c_1d3_ibfk_1` FOREIGN KEY (`country_id`)
REFERENCES `countries` (`id`) ON DELETE CASCADE)
I have checked that all tables are using innodb and the datatype are both "int".
What is the problem?