Cannot delete or update a parent row: a foreign key constraint fails 只能在DOS下启动MySql,运行sql语句关闭外键检测SET FOREIGN_KEY_CHECKS = 0;执行操作SET FOREIGN_KEY_CHECKS = 1;其他:关闭唯一性校验set unique_checks=0;set unique_checks=1;