For those blessed with MySQL >= 5.1.12, you can control this option globally at runtime:
SET GLOBAL log_output = 'TABLE';
SET GLOBAL general_log = 'ON';
mysql.general_log
号桌如果希望输出到文件而不是表:
SET GLOBAL log_output = "FILE";
the default.SET GLOBAL general_log_file = "/path/to/your/logfile.log";
SET GLOBAL general_log = 'ON';
与编辑相比,我更喜欢这种方法.cnf文件是因为:
my.cnf
文件,可能会永久打开日志(log)记录/var/log /var/data/log
/opt /home/mysql_savior/var
有关更多信息,请参阅