set check foreign key mysql code example Example: turn on foreign keys check mysql SET FOREIGN_KEY_CHECKS=0;