mysql记录执行的SQL语句

show variables like "general_log%";

SET GLOBAL general_log = 'ON';
SET GLOBAL general_log = 'OFF';

原文地址:https://www.cnblogs.com/kgdxpr/p/10493794.html