How to disable foreign key constraints in MySQL
Why would you want to disable a foreign key constraint? Well there are some scenarios... such as when you are refreshing your testing or development environment with production data or when you are restoring your production environment from a backup after an unfortunate mishap.
So how do you disable your constraints:
Once you have done the necessary options, then you can re-enable them by running