MENU
Others
BINLOG 'str' |
BINLOG is an internal-use statement generated by the mysqlbinlog program as the printable representation of certain events in binary log files. |
'str' value is a base 64-encoded string that the server decodes to determine the data change indicated by the corresponding event. |
CACHE INDEX tbl_index_list [, tbl_index_list] ... [PARTITION (partition_list | ALL)] IN key_cache_name tbl_index_list: tbl_name [[INDEX|KEY] (index_name[, index_name] ...)] partition_list: partition_name[, partition_name][, ...] |
This assigns table indexes to a specific key cache. It is used only for MyISAM tables. After the indexes have been assigned, they can be preloaded into the cache if desired with LOAD INDEX INTO CACHE. |
A key cache must exist before you can assign indexes to it. The key cache referred to in a CACHE INDEX statement can be created by setting its size with a parameter setting statement or in the server parameter settings: SET GLOBAL keycache1.key_buffer_size=128*1024; |
Index assignment affects the server globally. |
CREATE TABLE pt (c1 INT, c2 VARCHAR(50), INDEX i(c1)) PARTITION BY HASH(c1) PARTITIONS 4; SET GLOBAL kc_fast.key_buffer_size = 128 * 1024; SET GLOBAL kc_slow.key_buffer_size = 128 * 1024; CACHE INDEX pt PARTITION (p0) IN kc_fast; CACHE INDEX pt PARTITION (p1, p3) IN kc_slow; |
FLUSH [NO_WRITE_TO_BINLOG | LOCAL] flush_option [, flush_option] ... flush_option: DES_KEY_FILE | HOSTS | [log_type] LOGS | PRIVILEGES | QUERY CACHE | STATUS | TABLES [tbl_name……] [WITH READ LOCK | FOR EXPORT] | USER_RESOURCES log_type: BINARY | ENGINE | ERROR | GENERAL | RELAY | SLOW |
DES_KEY_FILE reloads the DES keys from the file that was specified with the --des-key-file option at server startup time. |
HOSTS empties the host cache. You should flush the host cache if some of your hosts change IP address or if the error message Host 'host_name' is blocked occurs. |
FLUSH LOGS closes and reopens all log files. BINARY closes and reopens the binary log files. ENGINE closes and reopens any flushable logs for installed storage engines. Currently, this causes InnoDB to flush its logs to disk. ERROR closes and reopens the error log file. GENERAL closes and reopens the general query log file. RELAY closes and reopens the relay log files. SLOW closes and reopens the slow query 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. |
STATUS adds the current thread's session status variable values to the global values and resets the session values to zero. |
USER_RESOURCES resets all per-hour user resources to zero. |
FLUSH TABLES or FLUSH TABLE closes all open tables, forces all tables in use to be closed, and flushes the query cache. This also removes all query results from the query cache. |
FLUSH TABLES WITH READ LOCK acquires a global read lock and not table locks, so it is not subject to the same behavior as LOCK TABLES and UNLOCK TABLES with respect to table locking and implicit commits. Use UNLOCK TABLES to release the lock. |
FOR EXPORT ensures that changes to the tables have been flushed to disk. |
KILL [CONNECTION | QUERY] thread_id |
CONNECTION, the default, terminates the associated connection. QUERY terminates the statement that the connection is currently executing, but leaves the connection itself intact. |
Enter SHOW PROCESSLISTto see which threads are running. |
Killing a REPAIR TABLE or OPTIMIZE TABLE operation on a MyISAM table results in a table that is corrupted and unusable. |
LOAD INDEX INTO CACHE tbl_index_list [, tbl_index_list] ... tbl_index_list: tbl_name [PARTITION (partition_list | ALL)] [[INDEX|KEY] (index_name[, index_name] ...)] [IGNORE LEAVES] partition_list: partition_name[, partition_name][, ...] |
This preloads a table index into the key cache to which it has been assigned by an explicit CACHE INDEX statement, or into the default key cache otherwise. |
The IGNORE LEAVES modifier causes only blocks for the nonleaf nodes of the index to be preloaded. |
IGNORE LEAVES fails unless all indexes in a table have the same block size. You can determine index block sizes for a table by using myisamchk -dv and checking the Blocksize column. |
RESET {reset_option [,…]} reset_option: MASTER | QUERY CACHE | SLAVE |
MASTER deletes all binary logs listed in the index file, resets the binary log index file to be empty, and creates a new binary log file. |
QUERY CACHE removes all query results from the query cache. |
SLAVE makes the slave forget its replication position in the master binary logs. It also resets the relay log by deleting any existing relay log files and beginning a new one. |