1

I trying to import Magento store Mysql dump file via Navicat for Mysql to the new VPS

Cannot add or update a child row: a foreign key constraint fails 
CONSTRAINT FK_INDEX_PROCESS_EVENT_EVENT_ID_INDEX_EVENT_EVENT_ID FOREIGN KEY (`event_id`) REFERENCES `index_event` (`event_id`) 
ON DELETE CASCADE ON UPDATE CASCADE

I've added SET foreign_key_checks = 0; in the beginning of .sql file, and SET foreign_key_checks = 1; in the end - nothing changes. Also I've tried this: [Restoring a backup of a Magento database][1] - the result is the same

Error at query 9370: Cannot add or update a child row: a foreign key constraint fails (rain.#sql-7ac4_55, CONSTRAINT FK_INDEX_PROCESS_EVENT_EVENT_ID_INDEX_EVENT_EVENT_ID FOREIGN KEY (event_id) REFERENCES index_event (event_id) ON DELETE CASCADE ON UPDATE CASCADE)

Error at query 9478: Variable 'sql_mode' can't be set to the value of 'NULL'
Error at query 9479: Variable 'foreign_key_checks' can't be set to the value of 'NULL'
Error at query 9480: Variable 'unique_checks' can't be set to the value of 'NULL'
Error at query 9481: Variable 'character_set_client' can't be set to the value of 'NULL'
Error at query 9483: Variable 'collation_connection' can't be set to the value of 'NULL'
Error at query 9484: Variable 'sql_notes' can't be set to the value of 'NULL'

Can somebody help me please?

closed as off-topic by brentwpeterson, Keyul Shah, liyakat, MTM, John Cuthbert May 31 '15 at 15:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about third-party modules are generally off-topic because the scope of functionality and code are not available. For more information, see this meta post/answer." – brentwpeterson, Keyul Shah, liyakat, MTM, John Cuthbert
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Did you drop and re-create your database between import attempts? – brentwpeterson May 30 '15 at 16:47
  • Thanks for replying! No, I didn't. I've dumped working database to .sql file, then tried to import the dump to empty database – Oleksandr May 30 '15 at 23:22

Browse other questions tagged or ask your own question.