-- 查看日志是否开启和日志文件夹
show variables like '%general%';
SET GLOBAL general_log = 'On';
set global log_syslog=on;
-- 慢sql日志
set global slow_query_log=on;
set global sql_log_off=on;
-- 设置日志生成道的文件夹
SET GLOBAL general_log_file = '/logs/mysql/mysql.log';
标签:set,log,global,sql,mysql,日志
From: https://www.cnblogs.com/chron/p/17653958.html