I followed the advice here, but I’m still running into the same issues after importing my database to a local XAMPP installation.
My sql dump is wrapped in these tags:
SET FOREIGN_KEY_CHECKS=0;
// FULL DB DUMP
SET FOREIGN_KEY_CHECKS=1;
Even still, I get this error message:
Error
SQL query:
ALTER TABLE `mage_catalog_eav_attribute` ADD CONSTRAINT `FK_CATALOG_EAV_ATTRIBUTE_ID` FOREIGN KEY ( `attribute_id` ) REFERENCES `mage_eav_attribute` ( `attribute_id` ) ON DELETE CASCADE ON UPDATE CASCADE ;
MySQL said: Documentation
#1452 - Cannot add or update a child row: a foreign key constraint fails (`myDB_NAME`.<result 2 when explaining filename '#sql-2e0_5a'>, CONSTRAINT `FK_CATALOG_EAV_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mage_eav_attribute` (`attribute_id`) ON DE)
Can anyone help me understand what else I would need to disable these checks, or prevent this error?
I am running Magento 1.4.2, and importing with phpmyadmin via xampp.
Do not import via Phpmyadmin. It usually works really bad. Use the command line.
This should work: