Magento – Error Database Import

Picture

Today we had the import of a Magento database to a new database, the error message

SQL command:

— Constraints der Tabelle 'catalog_eav_attribute’

ALTER TABLE ‘catalog_eav_attribute’ ADD CONSTRAINT ‘FK_CATALOG_EAV_ATTRIBUTE_ID’ FOREIGN KEY ( ‘attribute_id’ ) REFERENCES ‘eav_attribute’ ( ‘attribute_id’ ) ON DELETE CASCADE ON UPDATE CASCADE ;
MySQL MANDATORY:
#1452 – Cannot add or update a child row: a foreign key constraint fails (‘d1167d0a’.<result 2 when explaining filename ‘#sql-412c_73dda’>, CONSTRAINT ‘FK_CATALOG_EAV_ATTRIBUTE_ID’ FOREIGN KEY (‘attribute_id’) REFERENCES ‘eav_attribute’ (‘attribute_id’) ON DELETE CA)

This has helped the following after the import command to execute:

SET foreign_key_checks = 0;
alter table catalog_eav_attribute add constraint FK_CATALOG_EAV_ATTRIBUTE_ID foreign key(attribute_id) references eav_attribute (attribute_id);
SET foreign_key_checks = 1;

Another problem after installing copy during an attempt in the Magento Connect area come. After clicking on the button, came the error message

magento Can not unpack gzipped data in file contents:

It then helped the files “cache.cfg” and “config.cfg” in the folder “downloader” rename, or delete. I just have a “-BACKUP” written just after the file extension, that the program was no longer available but if in doubt re-establish.

Maybe it will help someone else yet.

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

Leave a Reply

Your email address will not be published. Required fields are marked *