SHOW VARIABLES

  1. SHOW [{GLOBAL | SESSION}] VARIABLES LIKE 'pattern'

It returns the current values of a few server-wide variables. Also, support for GLOBAL and SESSION clauses was added.

  1. mysql> SHOW GLOBAL VARIABLES;
  2. +--------------------------+-----------+
  3. | Variable_name | Value |
  4. +--------------------------+-----------+
  5. | autocommit | 1 |
  6. | collation_connection | libc_ci |
  7. | query_log_format | sphinxql |
  8. | log_level | info |
  9. | max_allowed_packet | 134217728 |
  10. | character_set_client | utf8 |
  11. | character_set_connection | utf8 |
  12. | grouping_in_utc | 0 |
  13. | last_insert_id | 123, 200 |
  14. +--------------------------+-----------+
  15. 9 rows in set (0.00 sec)
  1. mysql> show variables like '%log%';
  2. +------------------+----------+
  3. | Variable_name | Value |
  4. +------------------+----------+
  5. | query_log_format | sphinxql |
  6. | log_level | info |
  7. +------------------+----------+
  8. 2 rows in set (0.00 sec)
  1. mysql> show session variables like 'autocommit';
  2. +---------------+-------+
  3. | Variable_name | Value |
  4. +---------------+-------+
  5. | autocommit | 0 |
  6. +---------------+-------+
  7. 1 row in set (0.00 sec)

SHOW COLLATION

  1. SHOW COLLATION

This is currently a placeholder query that does nothing and reports success. That is in order to keep compatibility with frameworks and connectors that automatically execute this statement.

  1. mysql> SHOW COLLATION;
  2. Query OK, 0 rows affected (0.00 sec)

Profiling