Magento Tips: How To Set Up Global MySQL Variables

Mar 13, 2013 729 Updated: February 18, 2021 13:24

Sometimes when updating Magento to a new version we need not only to update the database structure, but also save our data. For this reason it is necessary first to back up the database and only then try to update it. In some cases, due to external table restrictions we can not run updates, but we can temporary disable the external restrictions set up for the table data.

Take the configuration file  app/etc/local.xml:


And add the expression SET FOREIGN_KEY_CHECKS=0; which disables the verification of external keys for the current connection:


After that you can try to update, and when the update finishes, delete the added expression.

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

Post a new comment