Other Administrative Statements • FLUSH OPTIMIZER_COSTS • FLUSH SLOW LOGS • FLUSH RELAY LOGS [FOR CHANNEL  channel ] • FLUSH PRIVILEGES Re-reads the cost model tables so that the optimizer starts using the current cost estimates stored in them. This operation requires the  FLUSH_OPTIMIZER_COSTS  or  RELOAD  privilege. The server writes a warning to the error log for any unrecognized cost model table entries. For information about these tables, see Section 8.9.5, “The Optimizer Cost Model” . This operation affects only sessions that begin subsequent to the flush. Existing sessions continue to use the cost estimates that were current when they began. Re-reads the privileges from the grant tables in the  mysql  system schema. As part of this operation, the server reads the  global_grants  table containing dynamic privilege assignments and registers any unregistered privileges found there. This operation requires the  RELOAD  privilege. If the  --skip-grant-tables  option was specified at server startup to disable the MySQL privilege system,  FLUSH PRIVILEGES  provides a way to enable the privilege system at runtime. Resets failed-login tracking (or enables it if the server was started with  --skip-grant-tables ) and unlocks any temporarily locked accounts. See Section 6.2.15, “Password Management” . Frees memory cached by the server as a result of  GRANT ,  CREATE USER ,  CREATE SERVER , and INSTALL PLUGIN  statements. This memory is not released by the corresponding  REVOKE ,  DROP USER ,  DROP SERVER , and  UNINSTALL PLUGIN  statements, so for a server that executes many instances of the statements that cause caching, there is an increase in cached memory use unless it is freed with  FLUSH PRIVILEGES . Clears the in-memory cache used by the  caching_sha2_password  authentication plugin. See Cache Operation for SHA-2 Pluggable Authentication. Closes and reopens any relay log file to which the server is writing. If relay logging is enabled, the sequence number of the relay log file is incremented by one relative to the previous file. This operation requires the  RELOAD  privilege. The  FOR CHANNEL  channel  clause enables you to name which replication channel the operation applies to. Execute  FLUSH RELAY LOGS FOR CHANNEL  channel  to flush the relay log for a specific replication channel. If no channel is named and no extra replication channels exist, the operation applies to the default channel. If no channel is named and multiple replication channels exist, the operation applies to all replication channels. For more information, see Section 17.2.2, “Replication Channels” . Closes and reopens any slow query log file to which the server is writing. This operation requires the  RELOAD  privilege. 2973 FLUSH ERROR LOGS FLUSH GENERAL LOGS FLUSH RELAY LOGS FLUSH SLOW LOGS