I'm using PHP's PDO driver/API/library to create some tables in MySQL. When MySQL can't create a table due to a foreign key constraint problem, it returns the following error
Can't create table 'dbname.table_name' (errno: 150)
Is there anyway to have MySQL tell you (or to automatically lookup/analyze) why it couldn't create the table. For example, if you attempt to create a table with 10 foreign keys, and one key is invalid, is there a way to have MySQL tell you which one is the problematic key? Or do you need to rely on human intelligence and debugging to figure this out for yourself?