Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysql: turn on the general log

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

like image 508
user1128331 Avatar asked Nov 22 '13 10:11

user1128331


1 Answers

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';
like image 72
Sathish D Avatar answered Oct 13 '22 14:10

Sathish D