GLOBAL | SESSION}] VARIABLES LIKE 'pattern' SHOW [{
It returns the current values of a few server-wide variables. Also, support for GLOBAL
and SESSION
clauses was added.
> SHOW GLOBAL VARIABLES;
mysql+--------------------------+-----------+
Value |
| Variable_name | +--------------------------+-----------+
1 |
| autocommit |
| collation_connection | libc_ci |
| query_log_format | sphinxql |
| log_level | info |134217728 |
| max_allowed_packet |
| character_set_client | utf8 |
| character_set_connection | utf8 |0 |
| grouping_in_utc | 123, 200 |
| last_insert_id | +--------------------------+-----------+
9 rows in set (0.00 sec)
> show variables like '%log%';
mysql+------------------+----------+
Value |
| Variable_name | +------------------+----------+
| query_log_format | sphinxql |
| log_level | info |+------------------+----------+
2 rows in set (0.00 sec)
> show session variables like 'autocommit';
mysql+---------------+-------+
Value |
| Variable_name | +---------------+-------+
0 |
| autocommit | +---------------+-------+
1 row in set (0.00 sec)