Quality Work Make Your Dream Come True
Wordpress Buddypress bbPress developer

Mysql Duplicate Entry

I developed AWS S3 CDN plugin which help users move their image, js, css, pdf… document to AWS S3, a friend request me install it on their site and do a little extra work, when I try to analyze their codes and settings in Mysql database, I found some issues:

mysql -uroot -p’*******’ –default-character-set=utf8 wp_prettys < /home/wp_prettys.sql

and the result is:

ERROR 1062 (23000) at line 527019: Duplicate entry ‘9733467’ for key 1
ERROR 1062 (23000) at line 734137: Duplicate entry ‘9841760’ for key 1
ERROR 1062 (23000) at line 760026: Duplicate entry ‘9871034’ for key 1
ERROR 1062 (23000) at line 967140: Duplicate entry ‘9912852’ for key 1

The database should have no these duplicate records and the database need some repair works, ofcourse we can still import the database from the sql like this;

mysql -uroot -p’*******’ –force –default-character-set=utf8 wp_prettys < /home/wp_prettys.sql

And then we can start works.

Leave a Reply