尝试通过 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.
最佳答案
将评论转换为答案:
您是否在转储时或在读回转储时遇到此错误?
SET FOREIGN_KEY_CHECKS=0;
和
SET FOREIGN_KEY_CHECKS=1;
在你的转储周围应该可以解决问题。
关于mysql - 通过 SSH 导入 magento 数据库时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11942420/