FLUSH flush_option[,flush_option...]

Description: Clears the various internal caches used by MySQL.

flush_option can be any of the following:

  • HOSTS— Clears the host cache tables.

  • LOGS— Closes and reopens all logs.

  • PRIVILEGES— Reloads the grant tables.

  • TABLES— Closes all tables, even those in use, saving them to disk.

  • TABLE table_name and TABLES table_name1,table_name2... Closes only the given tables, saving them to disk.

  • TABLES WITH READ LOCK— Closes all open tables and places a read lock on all tables in all databases; tables remain locked until you issue an UNLOCK TABLES; can be useful for taking a snapshot, such as for backup purposes.

  • STATUS— Resets most system status variables to zero.

The equivalent of mysqladmin flush-option.

Description ...

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.