Mysql error when deleting the table structure: Error Code: 1217. Cannot delete or update a parent row: a foreign key constraint fails

The reason is the constraint of Foreign Key. After shutting down the Foreign Key check, the SQL table was deleted successfully:
Set FOREIGN_KEY_CHECKS = 0; Turn off the Foreign Key inspection
Drop table Table_Name;
The Set FOREIGN_KEY_CHECKS = 1; Resume Foreign Key inspection

Read More: