-- 1、设置
-- SET GLOBAL log_output = 'TABLE'; SET GLOBAL general_log = 'ON';
-- SET GLOBAL log_output = 'TABLE'; SET GLOBAL general_log = 'OFF';

-- 2、查询
SELECT * from mysql.general_log ORDER BY event_time DESC

-- 3、清空表(delete对于这个表,不允许使用,只能用truncate)
-- truncate table mysql.general_log;

posted on 2019-07-18 13:42  张小帅  阅读(343)  评论(0编辑  收藏  举报