//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日志
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;