The commandsql
SET FOREIGN_KEY_CHECKS=0;
sets the value of a variable in a session scope. So it affects on the current session only, and do not affect on another sessions, both already running and those that will be launched later.session
If you specify new value as a global-scope one using the commandspa
SET GLOBAL FOREIGN_KEY_CHECKS=0;
then the global setting will be set. It affects on the current session and sessions that will be launched later, and do not affects on another sessions, which are already running.code