//mysql开启sql日志
SET GLOBAL log_output = 'TABLE';SET GLOBAL general_log = 'ON';
//mysql关闭sql日志
SET GLOBAL log_output = 'TABLE'; SET GLOBAL general_log = 'OFF';
---查询mysql运行过的sql
SELECT * from mysql.general_log ORDER BY event_time DESC;
MySQL SQL日志管理
//mysql开启sql日志
SET GLOBAL log_output = 'TABLE';SET GLOBAL general_log = 'ON';
//mysql关闭sql日志
SET GLOBAL log_output = 'TABLE'; SET GLOBAL general_log = 'OFF';
---查询mysql运行过的sql
SELECT * from mysql.general_log ORDER BY event_time DESC;
936
2234

被折叠的 条评论
为什么被折叠?