SET foreign_key_checks = 0; // 先设置外键约束检查关闭
执行你想执行的删除语句
SET foreign_key_checks = 1; // 开启外键约束检查,以保持表结构完整性