Name
FLUSH
Synopsis
FLUSH [LOCAL|NO_WRITE_TO_BINLOG] option[, ...]Options:
DES_KEY_FILE, HOSTS, LOGS, PRIVILEGES, QUERY_CACHE, STATUS, TABLE, TABLES, TABLES WITH READ LOCK, USER_RESOURCES
Use this statement to clear temporary caches in MySQL. It
requires RELOAD privileges. Multiple options may be
given in a comma-separated list.
To prevent this statement from writing to the binary log file,
include the NO_WRITE_TO_BINLOG keyword or its
alias, LOCAL. The DES_KEY_FILE
option reloads the DES encryption file.
HOSTS clears the hosts cache, which is used to minimize host/IP address lookups. The
hosts cache may need to be flushed if a host has been blocked from
accessing the server. LOGS is used to close all of
the log files and reopen them. The PRIVILEGES
option reloads the grant table for users. This is necessary if
the user table in the mysql
database is modified manually, without a GRANT
statement. QUERY CACHE instructs the server to defragment the query cache. The
STATUS option resets the status variables that report information about the
caches.
The TABLE option, followed by one or more table names, forces the given tables to
be closed. This will terminate any active queries on the given tables.
The TABLES option, without any table names listed, causes all tables to be closed,
all queries to be terminated, and the query cache to be flushed. This
option is actually the same as TABLE with no table
name.
Use the TABLES WITH READ LOCK option to close all tables and lock them with a global read ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access