DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info.gz) FLUSH

Info Catalog (mysql.info.gz) CACHE INDEX (mysql.info.gz) Other administrative SQL (mysql.info.gz) KILL
 
 13.5.5.2 `FLUSH' Syntax
 .......................
 
      FLUSH [LOCAL | NO_WRITE_TO_BINLOG] FLUSH_OPTION [, FLUSH_OPTION] ...
 
 You should use the `FLUSH' statement if you want to clear some of the
 internal caches MySQL uses.  To execute `FLUSH', you must have the
 `RELOAD' privilege.
 
 FLUSH_OPTION can be any of the following:
 
 `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 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 allows the host to attempt to connect
      again.  Blocked host. You can start `mysqld' with
      `--max_connect_errors=999999999' to avoid this error message.
 
 `DES_KEY_FILE'
      Reloads the DES keys from the file that was specified with the
      `--des-key-file' option at server startup time.
 
 `LOGS'
      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 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 or binary log file.
       Update 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' will ignore `SIGHUP' and `SIGQUIT').
 
 `PRIVILEGES'
      Reloads the privileges from the grant tables in the `mysql'
      database.
 
 `QUERY CACHE'
      Defragment the query cache to better utilize its memory.  This
      statement does not remove any queries from the cache, unlike
      `RESET QUERY CACHE'.
 
 `STATUS'
      Resets most status variables to zero. This is something you should
      use only when debugging a query.  Bug reports.
 
 `{TABLE | TABLES} [TBL_NAME [, TBL_NAME] ...]'
      When no tables are named, closes all open tables and forces all
      tables in use to be closed. This also flushes the query cache.
      With one or more table names, flushes only the given tables.
      `FLUSH TABLES' also removes all query results from the query
      cache, like the `RESET QUERY CACHE' statement.
 
 `TABLES WITH READ LOCK'
      Closes all open tables and locks all tables for all databases with
      a read lock until you execute `UNLOCK TABLES'. This is very
      convenient way to get backups if you have a filesystem such as
      Veritas that can take snapshots in time.
 
 `USER_RESOURCES'
      Resets all per-hour user resources to zero. This enables clients
      that have reached their hourly connection, query, or update limits
      to resume activity.  `FLUSH USER_RESOURCES' does not apply to the
      limit on maximum simultaneous connections.   `GRANT' GRANT.
 
 
 Before MySQL 4.1.1, `FLUSH' statements are not written to the binary
 log. As of MySQL 4.1.1, they are written to the binary log unless the
 optional `NO_WRITE_TO_BINLOG' keyword (or its alias `LOCAL') is used.
 Exceptions are that `FLUSH LOGS', `FLUSH MASTER', `FLUSH SLAVE', and
 `FLUSH TABLES WITH READ LOCK' are not logged in any case because they
 would cause problems if replicated to a slave.
 
 You can also access some of these statements with the `mysqladmin'
 utility, using the `flush-hosts', `flush-logs', `flush-privileges',
 `flush-status', or `flush-tables' commands.
 
 Take also a look at the `RESET' statement used with replication.  
 `RESET' RESET.
 
Info Catalog (mysql.info.gz) CACHE INDEX (mysql.info.gz) Other administrative SQL (mysql.info.gz) KILL
automatically generated byinfo2html