Server System Variables the synchronizing to disk. See Section B.3.3.3, “What to Do If MySQL Keeps Crashing” . This variable is set to  ON  if you start  mysqld  with the  --flush  option. If  flush  is enabled, the value of  flush_time  does not matter and changes to flush_time  have no effect on flush behavior. Note If  flush  is enabled, the value of  flush_time  does not matter and changes to flush_time  have no effect on flush behavior. If this is set to a nonzero value, all tables are closed every  flush_time  seconds to free up resources and synchronize unflushed data to disk. This option is best used only on systems with minimal resources. Note • foreign_key_checks • flush_time Command-Line Format --flush-time=# System Variable flush_time Scope Global Dynamic Yes SET_VAR  Hint Applies No Type Integer Default Value 0 Minimum Value 0 If set to 1 (the default), foreign key constraints are checked. If set to 0, foreign key constraints are ignored, with a couple of exceptions. When re-creating a table that was dropped, an error is returned if the table definition does not conform to the foreign key constraints referencing the table. Likewise, an  ALTER TABLE  operation returns an error if a foreign key definition is incorrectly formed. For more information, see Section 13.1.20.5, “FOREIGN KEY Constraints” . Setting this variable has the same effect on  NDB  tables as it does for  InnoDB  tables. Typically you leave this setting enabled during normal operation, to enforce referential integrity. Disabling foreign key checking can be useful for reloading  InnoDB  tables in an order different from that required by their parent/child relationships. See Section 13.1.20.5, “FOREIGN KEY Constraints” . Setting  foreign_key_checks  to 0 also affects data definition statements:  DROP SCHEMA  drops a schema even if it contains tables that have foreign keys that are referred to by tables outside the schema, and  DROP TABLE  drops tables that have foreign keys that are referred to by other tables. System Variable foreign_key_checks Scope Global, Session Dynamic Yes SET_VAR  Hint Applies Yes Type Boolean Default Value ON 800