试试先用语句删除重复的行.delete from tb as a where id<>(select min(id) from tb as b where a.user=b.user and a.email=b.email )然后再建唯一索引.