When I importing from a "working" Joomla! DB I get this error: #1062 - Duplicate entry '1' for key 'PRIMARY'

The complete error is: -- -- Dumping data for table azzdx_ak_profiles -- INSERT INTO azzdx_ak_profiles (id, description, configuration, filters) VALUES (1, 'Default Backup Profile', '###AES128###pd8vwi ....

1062 - Duplicate entry '1' for key 'PRIMARY'

I checked the profiles table but Auto_Increment was enable. I'm working on localhost. The old database working fine. I just copied it, I mean exported all the tables. Then, I created a blank SQL DB and tried to import. But import was unsuccesfull.

Any help?

1 Answer 1


This is "a quick and dirty suggestion":
Check to see how many ak_profiles exist in your dumb-file, with same id. If more than 1, then remove the duplicates, save the file and try again to import.

Even if it's working in your site, the table may have an inconsistency, manually check it to remove a duplicated entry.

QUICK TRICK: Change INSERT INTO with REPLACE INTO. It works as an Insert or Update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.