Restoring a backup in Magento


/ Published in: MySQL
Save to your folder(s)

Wrap these two sets of commands around your sql backup if it hasn't come from a backup from the Magento admin interface (Magento adds this).

This stops foreign key checks and then restarts them.

The /*!40101 ---- */ code around the SET commands asks "If this version of mySQL is 4.1.1 or newer then run the SET command else do nothing." Older versions will not understand the statement.

This allows for easier compatibility with other versions of mySQL.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.