Error 1217
Error 1217: can't delete or Update a parent row: a foreign key constrain Fail in mysql. This is the funny things all tables would be deleted except some of left due to the Foreign key constrain. Wheneve you try to drop database then you got same aforesaid message. If you disable the Foreign key check or You should be set Foreign_key_Check=0 For instance Set Foreign_key_check=0; Drop table myfirsttabletodrop; Drop table mysecoubdtabletodrop Set foreign_key_check=1; I hope you will solve your problem. Have a nice day.