Getting MySQL System Variables
Posted:
Thursday, October 22nd, 2015Last modified:
Thursday, October 22nd, 2015Topics:
MySQLList all system variables
SHOW VARIABLES\G
Get the value of a global system variable
SELECT @@global.slow_query_log; +-------------------------+ | @@global.slow_query_log | +-------------------------+ | 0 | +-------------------------+
Get the value of a system session variable
SELECT @@session.big_tables; +----------------------+ | @@session.big_tables | +----------------------+ | 0 | +----------------------+ 1 row in set (0.00 sec)
Get multiple system variable values
SELECT @@global.time_format, @@global.lock_wait_timeout, @@global.aria_page_checksum;; +----------------------+----------------------------+-----------------------------+ | @@global.time_format | @@global.lock_wait_timeout | @@global.aria_page_checksum | +----------------------+----------------------------+-----------------------------+ | %H:%i:%s | 31536000 | 1 | +----------------------+----------------------------+-----------------------------+ 1 row in set (0.00 sec)
References
- 5.1.5.2 Dynamic System Variables - This page lists all the dynamic system variables.
Available Wiki Topics
The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.