mysql - Database full of duplicate entries -
i have huge database full of duplicate entry errors. fastest way remove of errors?
error: 1062 - duplicate entry 'x' key 'primary'
thanks in advance.
if no matter left in table that:
- dump datebase
- truncate tables
- add pk whatever need (empty db)
- in console replace dump
insert
insert ignore
- recover dump
- profit
i did once, not @ production/not big db - 200mb per dump - anoing relation issue @ localhost. know it's not pretty... me worked.
edit: if thinks it's bad solution, please leave comment - know how better...
Comments
Post a Comment