2013-08-08 3 views
0

다른 서버에서 mysql 파일을 업로드하려고합니다. 하지만 업로드 할 때 .xml 또는 .zip을 업로드 할 때 흰색 페이지가 표시됩니다.Blanco 페이지에서 mysql 파일을 업로드 한 후

나는 그것이 Magento라고 말할 필요가 있습니다. 내가 .SQL 업로드

내가이 오류를 얻을 : 오류 SQL 쿼리 :

-- 
-- Constraints for table `eav_entity_attribute` 
-- 
ALTER TABLE `eav_entity_attribute` ADD CONSTRAINT `FK_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE` FOREIGN KEY ( `attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE , 
ADD CONSTRAINT `FK_EAV_ENTITY_ATTRIBUTE_GROUP` FOREIGN KEY ( `attribute_group_id`) REFERENCES `eav_attribute_group` ( `attribute_group_id`) ON DELETE CASCADE ON UPDATE CASCADE ; 

MySQL은 말했다 : 문서

#1452 - Cannot add or update a child row: a foreign key constraint fails (geschenk_test . #sql-29b_7c74 , CONSTRAINT FK_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE FOREIGN KEY (attribute_id) REFERENCES eav_attribute (attribute_id) ON DELETE CASCADE ON UPDATE CASCADE)

+0

당신은 FOREIGN_KEY_CHECKS = 0을 설정해야합니다 SQL 파일에서; 찾는 [여기] [1] [1] : http://stackoverflow.com/questions/2429655/can-you-automatically-create-a-mysqldump-file-that-doesnt-enforce -foreign-key-c – Emi

답변

0
To restore a .sql file backup without constraint checking, simply add the following statements at the beginning of your .sql file: 

SET @[email protected]@CHARACTER_SET_CLIENT; 
SET @[email protected]@CHARACTER_SET_RESULTS; 
SET @[email protected]@COLLATION_CONNECTION; 
SET NAMES utf8; 
SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0; 
SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; 
SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'; 
SET @[email protected]@SQL_NOTES, SQL_NOTES=0; 

At the end of the file, add the statements required to turn on constraint checking again: 

SET [email protected]_SQL_MODE; 
SET [email protected]_FOREIGN_KEY_CHECKS; 
SET [email protected]_UNIQUE_CHECKS; 
SET [email protected]_CHARACTER_SET_CLIENT; 
SET [email protected]_CHARACTER_SET_RESULTS; 
SET [email protected]_COLLATION_CONNECTION; 
SET [email protected]_SQL_NOTES; 


Please refer this http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/restoring_a_backup_of_a_magento_database 
관련 문제