Mysql: enable shared log

I am trying to enable shared log in mysql I am using xampp as a local server and this is my.ini

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

I can not find the file at all, please help

+4
source share
3 answers

I find XD wrong

he must be ...

general_log = 1
general_log_file = "mysql_query.log"

and don't forget to check the log_output variable for "FILE"

+3
source

where is the log?

mysql> SHOW variables like '%general_log%';

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

do you want to change location?

mysql> SET GLOBAL general_log_file = 'file name';
+3
source

just found the answer, maybe help someone

https://dev.mysql.com/doc/refman/5.1/en/query-log.html as root

SET GLOBAL general_log = 'ON';
0
source

All Articles