Online Documentation for SQL Manager for MySQL

Flush usage


The following list illustrates the use of FLUSH:

 

  • HOSTS

Empties the host cache tables. You should flush the host tables if some of your hosts change IP number or if you get the error message 'Host ... is blocked'. When more than max_connect_errors errors occur in a row for a given host while connection to MySQL server, MySQL assumes something is wrong and blocks the host from further connection requests. Flushing the host tables allows the host to attempt to connect again.

 

  • LOGS

Closes and reopens all log files. If you have specified the update log file or a binary log file without an extension, the extension number of the log file will be incremented by one relative to the previous file. If you have used an extension in the file name, MySQL will close and reopen the update log file.

 

  • PRIVILEGES

Reloads the privileges from the grant tables in the MySQL database.

 

  • QUERY CACHE

Defragments the query cache to better utilize its memory. This command will not remove any queries from the cache, unlike RESET QUERY CACHE.

 

  • TABLES

Closes all open tables and forces all tables in use to be closed.

 

  • TABLES WITH READ LOCK

Closes all open tables and locks all tables for all databases with a read until one executes UNLOCK TABLES. This is very convenient way to get backups if you have a file system, like Veritas, that can take snapshots in time.

 

  • STATUS

Resets most status variables to zero. This is something one should only use when debugging a query.

 

  • USER_RESOURCES

Resets all user resources to zero. This will enable blocked users to login again.