Status variables provide information about the server's operational state. These variables can be displayed by the SHOW STATUS statement or by executing the mysqladmin extended-status command.
Status variable names are not case sensitive.
The more general variables are described in the following list. Separate sections after that describe sets of variables that are related to each other. These include variables for statement counters, the InnoDB storage engine, the query cache, and SSL.
The number of client connections aborted due to clients not closing the connection properly.
The number of failed attempts to connect to the server.
The number of transactions that had to use a temporary disk file because their size exceeded the value of the binlog_cache_size system variable. This variable was introduced in MySQL 4.1.2.
The number of transactions that could be held in the binary log cache because their size did not exceed the value of the binlog_cache_size system variable. This variable was introduced in MySQL 4.1.2.
The total number of bytes received from all clients.
The total number of bytes sent to all clients.
See "Statement Counter Status Variables."
The number of attempts to connect to the server (both successful and unsuccessful). If this number is quite high, you may want to look into using persistent connections in your clients if possible.
The number of on-disk temporary tables created while processing statements.
The number of temporary files created by the server.
The number of in-memory temporary tables created while processing statements.
The number of errors that have occured while processing INSERT DELAYED rows.
The current number of INSERT DELAYED handlers.
The number of INSERT DELAYED rows that have been written.
The number of FLUSH statements that have been executed.
The number of requests to commit a transaction.
The number of requests to delete a row from a table.
The number of requests to read the first row from an index.
The number of requests to read a row based on an index value.
The number of requests to read the next row in index order.
The number of requests to read the previous row in descending index order.
The number of requests to read a row based on its position.
The number of requests to read the next row. If this number is high, you are likely performing many statements that require full table scans or that are not using indexes properly.
The number of requests to roll back a transaction.
The number of requests to update a row in a table.
The number of requests to insert a row in a table.
See "InnoDB Status Variables."
The number of blocks in the key cache that have been modified but not yet flushed to disk. This variable was renamed from Not_flushed_key_blocks in MySQL 4.1.1.
The current number of unused blocks in the key cache. This variable was introduced in MySQL 4.1.2.
The maximum number of blocks in the key cache that have ever simultaneously been in use.
The number of requests to read a block from the key cache.
The number of physical reads of index blocks from disk.
The number of requests to write a block to the key cache.
The number of physical writes of index blocks to disk.
The query optimizer's most recent query cost calculation, or 1 if no cost has yet been calculated. This variable was introduced in MySQL 5.0.1.
The maximum number of connections that have been open simultaneously.
The number of rows waiting to be written for INSERT DELAYED statements.
This is the name of the Key_blocks_not_flushed variable prior to MySQL 4.1.1.
The number of open files.
The number of open streams. A stream is a file opened with fopen(); this applies only to log files.
The number of open tables. It does not apply to TEMPORARY tables.
The total number of tables that have been opened. If this number is high, it may be a good idea to increase your table cache size.
See "Query Cache Status Variables."
The number of statements that have been received by the server (this includes both successful and unsuccessful statements). The ratio of Questions to Update yields the number of statements per second.
Failsafe replication status. This variable is not yet used.
The number of "full" joins; that is, joins performed without using indexes.
The number of joins performed using a range search on a reference table.
The number of joins performed using a range on the first table.
The number of joins performed such that a range search must be used to fetch rows on a secondary table.
The number of joins performed that used a full scan of the first table.
The number of temporary tables the slave thread has open.
Whether this server is acting as a slave that is currently connected to a server.
The number of threads that took longer than slow_launch_time seconds to create.
The number of queries that look longer than long_query_time seconds to execute.
The number of merge passes performed by the sort algorithm.
The number of sort operations performed using a range.
The number of rows sorted.
The number of sort operations performed using a full table scan.
See "SSL Status Variables."
The number of requests for a table lock that could be satisfied immediately with no waiting.
The number of requests for a table lock that could be satisfied only after waiting. If this value is high, it indicates that you have a lot of contention for table locks (most likely for MyISAM tables, which are locked at the table level).
The number of threads currently in the thread cache.
The number of currently open connections.
The total number of threads that have been created to handle client connections.
The number of threads that are not sleeping.
The number of seconds since the server started running.
The server maintains a set of status variables that serve as counters to indicate the number of times particular types of statements (commands) have been executed. There are dozens of such variables, and they all have similar names, so they are not listed individually here. Each statement counter variable name begins with Com_, and has a suffix that indicates the type of statement to which the counter corresponds. For example, Com_select and Com_drop_table indicate, respectively, how many SELECT and DROP TABLE statements the server has executed.
The following variables display information about the operation of the InnoDB storage engine. Many of them are available in the output of SHOW ENGINE INNODB STATUS, but are more easily parsed in the output from SHOW STATUS. Most of these variables were introduced in MySQL 5.0.2; exceptions are so noted.
The number of pages in the InnoDB buffer pool that contain data. This counts both clean pages that have not been modified and dirty pages that contain modified data.
The number of pages in the InnoDB buffer pool that contain modified data.
The number of InnoDB buffer pool pages for which flush requests have been issued.
The number of free pages in the InnoDB buffer pool.
The number of pages in the InnoDB buffer pool that are in the process of being written or that for some other reason cannot be flushed and freed for reuse.
The number of pages in the InnoDB buffer pool that are allocated for internal operations.
The total number of pages in the InnoDB buffer pool.
The number of random read-aheads initiated by InnoDB. These occur when InnoDB must read a large part of a table but in non-sequential order.
The number of sequential read-aheads initiated by InnoDB. These occur when InnoDB performs sequential full-table scans.
The number of logical read requests issued by InnoDB.
The number of single-pages reads done due to not being able to perform a logical read from the InnoDB buffer pool.
The number of times InnoDB had to wait for writes to the buffer pool to be flushed. Writes usually are done in the background, but InnoDB must perform a wait if no pages are available when it needs to read a page or create a new one.
The number writes to the InnoDB buffer pool.
The number sync-to-disk operations performed by InnoDB.
The number of pending InnoDB data sync-to-disk operations.
The number of pending InnoDB data read operations.
The number of pending InnoDB data write operations.
The number of bytes read by InnoDB.
The number of InnoDB data read operations.
The number of InnoDB data write operations.
The number of bytes written by InnoDB.
The number of pages written to the InnoDB doublewrite buffer.
The number of writes to the InnoDB doublewrite buffer.
The number of times InnoDB had to wait for writes to the log buffer pool to be flushed.
The number of requests to write to the InnoDB log file.
The number of physical writes to the InnoDB log file.
The number of sync-to-disk operations for the InnoDB log file.
The number of pending sync-to-disk operations for the InnoDB log file.
The number of pending write operations for the InnoDB log file.
The number of bytes written to the InnoDB log file.
The compiled-in page size used by InnoDB. This can be used to convert measurements that are counted in page units to byte units. The default value is 16KB.
The number of pages created by InnoDB.
The number of pages read by InnoDB.
The number of pages written by InnoDB.
The number of row locks that InnoDB currently is waiting to acquire. This variable was introduced in MySQL 5.0.3.
The total amount of time in milliseconds spent acquiring InnoDB row locks. This variable was introduced in MySQL 5.0.3.
The average amount of time in milliseconds required to acquire an InnoDB row lock. This variable was introduced in MySQL 5.0.3.
The maximum amount of time in milliseconds required to acquire an InnoDB row lock. This variable was introduced in MySQL 5.0.3.
The number of times that InnoDB had to wait to acquire a row lock. This variable was introduced in MySQL 5.0.3.
The number of rows deleted from InnoDB tables.
The number of rows inserted in InnoDB tables.
The number of rows read from InnoDB tables.
The number of rows updated in InnoDB tables.
The following variables display information about the operation of the query cache.
The following variables provide information about the SSL management code. Many of them reflect the state of the current connection, and will be blank unless the connection actually is secure. These variables are unavailable unless SSL support actually has been built into the server.
The number of start renegotiations in server mode.
The number of started SSL/TLS handshakes in server mode.
The number of sessions successfully retrieved from the external session cache in server mode.
The SSL cipher (protocol) for the current connection (blank if no cipher is in effect). You can use this variable to determine whether the current connection is encrypted.
The list of available SSL ciphers.
The number of started SSL/TLS handshakes in client mode.
The number of start renegotiations in client mode.
The SSL context verification depth.
The SSL context verification mode.
The default SSL session timeout.
The number of successfully established SSL/TLS sessions in server mode.
The number of successfully established SSL/TLS sessions in client mode.
The number of SSL sessions found in the session cache.
The number of SSL sessions not found in the session cache.
The type of SSL caching used by the server.
The number of sessions removed from the cache because it was full.
The number of sessions that can be stored in the SSL session cache.
The number of sessions that have timed out.
Whether the session was reused from an earlier session.
The number of sessions currently in the session cache.
The SSL verification depth.
The SSL verification mode.
The protocol version of the connection.