通过SSH导入magento数据库时出错

时间:2012-08-13 21:14:56

标签: mysql magento command-line ssh terminal

尝试通过SSH转储magento数据库时出现以下错误

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)

我不是真正的shell或mysql的专家知道基础知识&在

之前从未遇到过这个问题

解决

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. 

1 个答案:

答案 0 :(得分:1)

将评论转换为答案:

您是在转储时,还是在读取转储时收到此错误?

SET FOREIGN_KEY_CHECKS=0;

SET FOREIGN_KEY_CHECKS=1;
转储周围的

应解决问题。