Local Community

Error in query (1062): Duplicate entry

When I import the wordpress database file on Local, I faced to an error:
Error in query (1067): Invalid default value for ‘scheduled_date_gmt’. After searching on that issue, I found this solution and added the below code on my wp database file:

SET SQL_MODE='ALLOW_INVALID_DATES'; in the database and was then able to execute the database schemas.

But, now I faced to another error:

INSERT INTO `wp_wfblockediplog` VALUES ("*…

Error in query (1062): Duplicate entry ‘\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xEF\xBF\xBD\xEF\xBF\xBD’ for key ‘PRIMARY’

Could you please, help me to solve this issue

Actually, you do not have any duplicate entry. I fixed mine using the INSERT INGNORE INTO command. Manually open and edit the sql file using the VS Code or any other code editor (VS Code because you can change up to 10,000 appearances easily). Use this command in place of the INSERT INTO command. You may not have to change all the appearances in the dump file, just that table affected.

You can learn more about this command here MySQL INSERT IGNORE Statement Explained By Examples.