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:

  1. dump datebase
  2. truncate tables
  3. add pk whatever need (empty db)
  4. in console replace dump insert insert ignore
  5. recover dump
  6. 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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -