Diego Macario Diego Macario - 2 months ago 9
MySQL Question

How to see the query logs of Mysql in Windows 8.1

I want to see the queries that are being executed in mysql server, I found the solutions but my log file is hidden, I've tried to change Windows properties but the file still hidden, what should I do?

I'm using Windows 8.1 64 bits and Mysql WorkBench with server 5.6

mysql> show variables like '%general%';

+------------------+-----------+
| Variable_name | Value |
+------------------+-----------+
| general_log | ON |
| general_log_file | DIEGO.log |
+------------------+-----------+
2 rows in set (0.00 sec)

Answer

to find where query log located:

mysql> show variables like '%general%';
+------------------+---------------------------------------+
| Variable_name    | Value                                 |
+------------------+---------------------------------------+
| general_log      | OFF                                   |
| general_log_file | /path/to/log                        |
+------------------+---------------------------------------+

and to turn on query log:

mysql> SET GLOBAL general_log  = 'ON';
Query OK, 0 rows affected (0.00 sec)

and, re-run show variables like '%general%', then'general_log' is ON.

Comments