- View current state of variables:
SHOW VARIABLES LIKE "general_log%";
- Set log location:
SET GLOBAL general_log_file = 'C:/Temp/QueryLog.log';
- Enable logging:
SET GLOBAL general_log = 'ON';
- Disable logging again (for improved database performance and disk usage):
SET GLOBAL general_log = 'OFF';