Name

SHOW STATUS

Synopsis

SHOW STATUS [LIKE 'pattern']

This statement displays status information and variables from the server. You can reduce the number of variables with the LIKE clause, based on a naming pattern for the variable name. Here is an example of how you can use this statement:

SHOW STATUS LIKE '%log%';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| Binlog_cache_disk_use  | 0     |
| Binlog_cache_use       | 3     |
| Com_show_binlog_events | 0     |
| Com_show_binlogs       | 0     |
| Com_show_logs          | 0     |
+------------------------+-------+

In this example, the results are limited only to variables that contain the word log in their names. You can change these variables at startup with certain options for the MySQL server daemon. See Chapter 10. You can change some of them while the daemon is running with the SET statement, without having to restart the server.

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.