mysql: turn on the general log

user1128331 picture user1128331 · Nov 22, 2013 · Viewed 8.7k times · Source

I try to turn on the general log on the mysql I use the xampp as the local server and this is my.ini

log_output = FILE
general_log = 1
general_log = "mysql_query.log"

I can't find the file at all, please help

Answer

Sathish D picture Sathish D · Nov 22, 2013

where is log located?

mysql> SHOW variables like '%general_log%';

+------------------+--------------------+
| Variable_name    | Value              |
+------------------+--------------------+
| general_log      | ON                 |
| general_log_file | /tmp/your_path.log |
+------------------+--------------------+

you want change location?

mysql> SET GLOBAL general_log_file = 'file name';