線上啟用:
(系統預設為 FILE)
SET GLOBAL log_output = "FILE";
SET GLOBAL general_log_file = "/path/to/your/logfile.log";
SET GLOBAL general_log = 'ON';
如:
SET GLOBAL log_output = "FILE";
SET GLOBAL general_log_file = "N:/temp/mysql_query.log";
SET GLOBAL general_log = 'ON';
或者
SET GLOBAL log_output = "TABLE";
SET GLOBAL general_log = 'ON';
查看資料表 mysql.general_log 的內容