MySQL supports multi-table DELETE, which is really cool and can help here. You can make a self-join by equality of all columns except id, and then delete the corresponding row with a large one id.
DELETE t2
FROM mytable t1 JOIN mytable t2
USING (column1, column2, column3)
WHERE t1.id < t2.id;
source
share