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