×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Massimo Zappino
Added: Jun 6, 2014 8:25 PM
Modified: Aug 11, 2017 2:34 PM
Views: 1947
Tags: log mysql query
  1. $ mysql -u root
  2. SET GLOBAL log_output = 'TABLE';
  3. SET GLOBAL general_log = 'ON';
  4.  
  5. Queries are logged into mysql.general_log table
  6.  
  7. # Log to a file
  8. SET GLOBAL log_output = "FILE";
  9. SET GLOBAL general_log_file = "/var/log/mysql/queries.log";
  10. SET GLOBAL general_log = 'ON';