Name

FLUSH

Synopsis

FLUSH option[, option...]

Flushes or resets various internal processes depending on the option(s) given. You must have reload privileges to execute this statement. The option can be any of the following:

HOSTS

Empties the cache table that stores hostname information for clients. This should be used if a client changes IP addresses, or if there are errors related to connecting to the host.

LOGS

Closes all of the standard log files and reopens them. This can be used if a log file has changed inode number. If no specific extension has been given to the update log, a new update log will be opened with the extension incremented by one.

PRIVILEGES

Reloads all of the internal MySQL permissions grant tables. This must be run for any changes to the tables to take effect.

STATUS

Resets the status variables that keep track of the current state of the server.

TABLES

Closes all currently opened tables and flushes any cached data to disk.

Get MySQL and mSQL 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.