进入Mysql
mysql
use information_schema;
开启日志模式
SET GLOBAL log_output = 'TABLE';SET GLOBAL general_log = 'ON';
日志查询所在表
SELECT * from mysql.general_log ORDER BY event_time DESC;
image.png
关闭日志模式
SET GLOBAL log_output = 'TABLE'; SET GLOBAL general_log = 'OFF';
清空查询日志
truncate table mysql.general_log;