/ Published in: MySQL

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.
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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */; /*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */; /*!40101 SET @[email protected]@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */; Your backed up sql goes here! /*!40101 SET [email protected]_SQL_MODE */; /*!40014 SET [email protected]_FOREIGN_KEY_CHECKS */; /*!40014 SET [email protected]_UNIQUE_CHECKS */; /*!40101 SET [email protected]_CHARACTER_SET_CLIENT */; /*!40101 SET [email protected]_CHARACTER_SET_RESULTS */; /*!40101 SET [email protected]_COLLATION_CONNECTION */; /*!40111 SET [email protected]_SQL_NOTES */;
Comments
