Hello @kartik,
To turn off foreign key constraint globally, do the following:
SET GLOBAL FOREIGN_KEY_CHECKS=0;
and remember to set it back when you are done
SET GLOBAL FOREIGN_KEY_CHECKS=1;
NOTE: You should only do this when you are doing single user mode maintenance. As it might resulted in data inconsistency. For example, it will be very helpful when you are uploading large amount of data using a mysqldump output
Hope it helps!!
Thank You!!