FLUSH [NO_WRITE_TO_BINLOG | LOCAL]
Before MySQL 4.1.1,
statements are not written to the binary log. As of MySQL 4.1.1,
FLUSH statements are written to
the binary log so that they will be replicated to replication
slaves. Logging can be suppressed with the optional
NO_WRITE_TO_BINLOG keyword or its alias
flush_option can be any of the
Reloads the DES keys from the file that was specified with
--des-key-file option at
server startup time.
Empties the host cache tables. You should flush the host
tables if some of your hosts change IP address or if you get
the error message
When more than
host_name' is blocked
occur successively for a given host while connecting to the
MySQL server, MySQL assumes that something is wrong and
blocks the host from further connection requests. Flushing
the host tables enables further connection attempts from the
host. See Section B.5.2.6, “Host 'host_name' is blocked”. You can start
to avoid this error message.
Closes and reopens all log files. If you have specified an
update log file or a binary log file without an extension,
the extension number of the log file is incremented by one
relative to the previous file. If you have used an extension
in the file name, MySQL closes and reopens the update log or
binary log file. See Section 5.3.4, “The Binary Log”. On Unix,
this is the same thing as sending a
SIGHUP signal to the
mysqld server (except on some Mac OS X
10.3 versions where mysqld ignores
Deletes all binary logs, resets the binary log index file
and creates a new binary log.
MASTER is deprecated in favor of
RESET MASTER, and is
supported for backward compatibility only. See
Section 220.127.116.11, “RESET MASTER Syntax”.
Reloads the privileges from the grant tables in the
mysql database. On Unix, this also occurs
if the server receives a
The server caches information in memory as a result of
GRANT statements. This memory
is not released by the corresponding
REVOKE statements, so for a
server that executes many instances of the statements that
cause caching, there will be an increase in memory use. This
cached memory can be freed with
Resets all replication slave parameters, including relay log
files and replication position in the master's binary logs.
is deprecated in favor of
SLAVE, and is supported for backward compatibility
only. See Section 18.104.22.168, “RESET SLAVE Syntax”.
Resets most status variables to zero. This is something you should use only when debugging a query. See Section 1.8, “How to Report Bugs or Problems”.
Closes all open tables, forces all tables in use to be
closed, and flushes the query cache.
TABLES also removes all query results from the
query cache, like the
With a list of one or more comma-separated table names,
this is like
TABLES with no names except that the server
flushes only the named tables. No error occurs if a
named table does not exist.
FLUSH TABLES WITH READ LOCK
Closes all open tables and locks all tables for all
databases with a global read lock until you explicitly
release the lock by executing
TABLES. This is a very convenient way to get
backups if you have a file system such as Veritas or ZFS
that can take snapshots in time.
FLUSH TABLES WITH
READ LOCK acquires a global read lock and not
table locks, so it is not subject to the same behavior
LOCK TABLES and
TABLES with respect to table locking and
TABLES implicitly commits any active
transaction only if any tables currently have been
TABLES. The commit does not occur for
WITH READ LOCK because the latter
statement does not acquire table locks.
Beginning a transaction causes table locks acquired
LOCK TABLES to
be released, as though you had executed
TABLES. Beginning a transaction does not
release a global read lock acquired with
WITH READ LOCK.
Resets all per-hour user resources to zero. This enables
clients that have reached their hourly connection, query, or
update limits to resume activity immediately.
USER_RESOURCES does not apply to the limit on
maximum simultaneous connections. See
Section 5.6.4, “Setting Account Resource Limits”.
The mysqladmin utility provides a
command-line interface to some flush operations, using commands