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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -