查询配置信息
SHOW GLOBAL VARIABLES LIKE '%log%';
SHOW GLOBAL VARIABLES LIKE '%general_log%';
#开启查询日志
mysql> set GLOBAL general_log='ON';
Query OK, 0 rows affected (0.01 sec)
SHOW GLOBAL VARIABLES LIKE '%log%';
SHOW GLOBAL VARIABLES LIKE '%general_log%';
#开启查询日志
mysql> set GLOBAL general_log='ON';
Query OK, 0 rows affected (0.01 sec)