I am trying to import(with bigdump) my live database to an test database. While importing the tables to the test database im getting the following error.

MySQL: Cannot add or update a child row: a foreign key constraint fails (DB_Name.catalog_product_entity, CONSTRAINT FK_CAT_PRD_ENTT_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID FOREIGN KEY (attribute_set_id) REFERENCES eav_attribute_set (attribute_set_id) ON )

I have set the SET Foreign_Key_Checks but it seems this isn't changing the error at all.


Do I need to change table names? What am I doing wrong?


I had the same problem. I ended importing my MySQL database dump using SSH.

This could be done like this:

  1. Upload the SQL file to the server.
  2. If the database does not exist please create one with an user. Note the username and password.
  3. Log into the server through SSH
  4. Navigate to the directory where your .sql file is.
  5. Type this this command: mysql -uUSERNAME -p DATABASE_NAME < data.sql

This works for me and it is also much faster.

  • Thanks for your fast response. You are talking about SSH but i never used it before, do i need to install some program or call my provider? – JurreT Feb 23 '15 at 13:47
  • I use PuTTY as my SSH Client. – knospe Feb 23 '15 at 13:58
  • Aha found it! I am going to try it right now :) – JurreT Feb 23 '15 at 14:02
  • New error has occured: ERROR 2002 (HY000): Did you ever have this error? – JurreT Feb 23 '15 at 14:12
  • 1
    Maybe this will help you. – knospe Feb 23 '15 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.