I have to create a database with two tables in MySQL, but the script fails with errno 150 (foreign key problem). I double-checked the foreign key fields to be the same on bo
In my case was probably a server bug dropping a table with the same name. Dropping the whole shcema and re-creating it solved the problem.