SET GLOBAL general_log = 'ON'; SET GLOBAL general_log_file = '/var/lib/mysql/query.log'; //执行下列语句来停止sql记录 SET GLOBAL general_log = 'OFF';