2

I am picking up a site from a predecessor and I am creating a dev version of a live site. After exporting the site via sequel pro or phpmyadmin (seperate attempts), the import process always bulks at the catalog_category_entity_int table.

Here is the error:

Error SQL query:

-- -- Dumping data for table `catalog_category_entity_int` -- INSERT INTO `catalog_category_entity_int` (`value_id`, `entity_type_id`, `attribute_id`, `store_id`, `entity_id`, `value`) VALUES (1, 3, 34, 1, 2, 1), (2, 3, 105, 0, 1, 1), (3, 3, 105, 0, 2, 1), (11, 3, 34, 0, 4, 1), (12, 3, 105, 0, 4, 1), (13, 3, 42, 0, 4, 6), (14, 3, 43, 0, 4, 1), (15, 3, 106, 0, 4, 0), (16, 3, 107, 0, 4, 0), (18, 3, 34, 0, 5, 1), (19, 3, 105, 0, 5, 1), (20, 3, 42, 0, 5, NULL), (21, 3, 43, 0, 5, 1), (22, 3, 106, 0, 5, 0), (23, 3, 107, 0, 5, 0), (26, 3, 43, 0, 2, 0), (27, 3, 107, 0, 2, 0), (43, 3, 34, 0, 8, 1), (44, 3, 105, 0, 8, 1), (45, 3, 42, 0, 8, NULL), (46, 3, 43, 0, 8, 1), (47, 3, 106, 0, 8, 0), (48, 3, 107, 0, 8, 0), (57, 3, 34, 0, 10, 1), (58, 3, 105, 0, 10, 1), (59, 3, 42, 0, 10, 6), (60, 3, 43, 0, 10, 1), (61, 3, 106, 0, 10, 0), (62, 3, 107, 0, 10, 0), (64, 3, 34, 0, 11, 1), (65, 3, 105, 0, 11, 1), (66, 3, 42, 0, 11, 21), (67, 3, 43, 0, 11, 1), (68, 3, 106, 0, 11, 0), (69, 3, 107, 0, 11, 0), ([...]

MySQL said: Documentation

1062 - Duplicate entry '3-285-42-0' for key 'UNQ_CAT_CTGR_ENTT_INT_ENTT_TYPE_ID_ENTT_ID_ATTR_ID_STORE_ID'

Information: I have tried exporting the site with Disable foreign keys checked (or adding the lines SET FOREIGN_KEY_CHECKS=0; to start and SET FOREIGN_KEY_CHECKS=1; to end)

I know that site was upgraded from 1.6 to 1.7.0.2 at start of the year, other than that the site has not been touched until I have arrived on the scene.

Before the site was exported I had re-indexed the live site, flushed the cache and cache storage, I had also rm -rf removed contents of var/cache and var/session

My question is: what do I do? Do I remove the duplicates in sql? (I know its very bad to touch magento db and should be avoided at all costs) Can I clean the db up with sql query to remove these duplicates? If I remove these duplicates, will this table have a knock on affect to other tables?

I have asked all my magento pals that I know and each and everyone has been unable to help and I have exhausted my knowledge so far. If anyone can provide insight, answer my questions or point me in right direction, I would be forever grateful and of course learn how to solve a very peculiar problem.

  • have you tried using the console mysqldump tool to export and mysql console tool to import? – ProxiBlue Sep 26 '13 at 9:32
  • apologies for not putting that in my information. I have tried importing via terminal into localhost and on server and it stops at same line. However I did not export via console, will that make a difference in terms of exporting? or will the output be same as if I were exporting from phpmyadmin or sequel pro? – diquinnyonk Sep 26 '13 at 11:28
  • Are you turning off key restraints when you try to import? – brentwpeterson Sep 26 '13 at 20:26
  • Also, is the current site running on 1.7? i.e. you can see the site running? – brentwpeterson Sep 26 '13 at 20:27
  • 1
    This is not an answer to the question, but maybe it's an answer to your problem. Try exporting the database using the db backup functionality of Magento. System->Tools->Backup – Marius Sep 27 '13 at 7:15