Here is the solution
https://stackoverflow.com/a/5016434
Another possible solution that I've just come across:
DELETE n1 FROM names n1, names n2 WHERE n1.id > n2.id AND n1.name = n2.name
if you want to keep the row with the lowest id value OR
DELETE n1 FROM names n1, names n2 WHERE n1.id < n2.id AND n1.name = n2.name
https://stackoverflow.com/a/5770309
DELETE DupRows.*
FROM MyTable AS DupRows
INNER JOIN (
SELECT MIN(ID) AS minId, col1, col2
FROM MyTable
GROUP BY col1, col2
HAVING COUNT(*) > 1
) AS SaveRows ON SaveRows.col1 = DupRows.col1 AND SaveRows.col2 = DupRows.col2
AND SaveRows.minId <> DupRows.ID;