#1062 – Duplicate entry ‘actUpdateInterval’ for key ‘PRIMARY’ when exporting live WordPress mySQL DB and importing to Localhost machine

This is a first for me.

I’m trying to export a live WordPress DB to restore it to my localhost machine which I have done a ton of time before but today I am getting the following error and don’t know where to begin with it or even what I need to delete, if it is a case of a duplicate entry.

Read More
Error
SQL query:

-- -- Dumping data for table `wp_wfConfig` -- INSERT INTO `wp_wfConfig` (`name`, `val`) VALUES ('actUpdateInterval', 0x32), ('alertEmails', 0x7765626d6173746572406172797374616c696665736369656e63652e636f2e7a61), ('alertOn_adminLogin', 0x31), ('alertOn_block', 0x31), ('alertOn_critical', 0x31), ('alertOn_loginLockout', 0x31), ('alertOn_lostPasswdForm', 0x31), ('alertOn_nonAdminLogin', 0x30), ('alertOn_throttle', 0x30), ('alertOn_warnings', 0x31), ('apiKey', 0x356132373234663433303764353439633335333132633639636165313462633830323137333665353961326163326537613031386162663938326465623063666262393762616466303864396235346234303464363634613861303739306339343361386432636634666536623639623066346238646662656139323365613463343431366430356162666237366264353636653064623365333362316437363331666162643462373830633462623537363831653162666435646364333734), ('autoBlockScanners', 0x30), ('blockedTime', 0x333030), ('blockFakeBots', 0x30), ('currentCronKey', ''), ('debugOn', 0x30), ('deleteTablesOnDeact', [...]

MySQL said: Documentation

#1062 - Duplicate entry 'actUpdateInterval' for key 'PRIMARY' 

Found a great online compare utility that allows me to share the results with anyone, so if someone could have a look at this and let me know if it is safe to delete one of these entries or let me know what I need to do, I would appreciate it.

I’ve looked at a number of solutions here on SO but I’m a little nervous of deleting something I am not sure I should be deleting.

EDIT:

If I look at the comparison, it seems that (‘actUpdateInterval’, 0x32), it the duplicate entry as there are two there with the number 32 which I am assuming is the problem child?

EDIT
Upon more searching it looks like a problem with the Wordfence plugin.

I have run table repairs on all the tables but this has not solved the issue either.

Next, I’ve duplicated the working online DB. Duplicated the site, logged in and deleted Wordfence in the hope that it deletes the tables for Wordfence too but this has not worked either.

I’m now at a loss as to what to do next? Any thoughts? This is keeping me from working on the project which I need to get done.

Thanks

Related posts

Leave a Reply

1 comment

  1. Evetually dropped all the wp_wf… tables which allowed me to export it from the live DB to the local DB. This is not the best solution but it did work.