user966834
user966834

Reputation: 85

error while importing magento database via SSH

I get the following error while trying to dump a magento database via SSH

ERROR 1452 (23000) at line 82966: Cannot add or update a child row: a foreign key constraint fails (`aloodawp/#sql-4136_fcf760`, CONSTRAINT `FK_EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELET)

im not really an expert with shell or mysql know the basics & never encountered this problem before

SOLVED

Are you getting this error when you dump, or when you are reading the dump back in? SET FOREIGN_KEY_CHECKS=0; and SET FOREIGN_KEY_CHECKS=1; around your dump should solve the problem. 

Upvotes: 2

Views: 667

Answers (1)

benmarks
benmarks

Reputation: 23205

Converting comment to answer:

Are you getting this error when you dump, or when you are reading the dump back in?

SET FOREIGN_KEY_CHECKS=0;

and

SET FOREIGN_KEY_CHECKS=1;

around your dump should solve the problem.

Upvotes: 1

Related Questions