2

尝试通过 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. 
4

1 回答 1

1

将评论转换为答案:

当您转储或重新读取转储时,您是否收到此错误?

SET FOREIGN_KEY_CHECKS=0;

SET FOREIGN_KEY_CHECKS=1;

在你的转储周围应该可以解决问题。

于 2012-08-14T04:53:44.310 回答