MySQL: ERROR 1005 (HY000) at line 14: Can’t create table ‘example.tbl’ (errno: 150)

If you get an error

ERROR 1005 (HY000) at line 14: Can't create table example.tbl (errno: 150)

it could be for at least two reasons. MySQL doesn’t allow to create foreign keys for  a set of tables one of which doesn’t exist. To solve this restriction you can set SET foreign_key_checks to 0:

mysql> SET foreign_key_checks = 0;

And after you done with restoring you should enable it back:

mysql> SET foreign_key_checks = 1;

The second reason could be different data types of columns you trying to create constrain between. For instance, bigint(20) and bigint(21). So, keep it in mind.

More information on  FOREIGN KEY Constraints.