MySQL (1)

How can I log queries as they hit a MySQL server?


Connect to MySQL with a client.

  1. enter: set global general_log = 'ON';
  2. enter: set global log_output = 'TABLE';
  3. query the table mysql.general_log (e.g., select * from mysql.general_log)

set global log_output='FILE';

set global general_log='OFF';

set global log_output='NONE';

set global general_log_file='mysql.q.log';


Add a Comment

NOTE: Comments are moderated and will not show until approved.