关闭外键约束->清空表->启动外键约束。 mysql> SET foreign_key_checks=0; mysql> truncate table bl_roles; mysql> SET foreign_key_checks=1;