Diego Macario
Diego Macario

Reputation: 1230

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)

Upvotes: 2

Views: 7664

Answers (2)

Diego Macario
Diego Macario

Reputation: 1230

I found other way if someone is using MySqlWorkBench.

Open the MysqlWorkBench, open the server status page.

Click em option file, and click in the tab logging.

Click in general_log_file, and choose where this file is gonna be.

And you can see the log file.

Upvotes: 1

Jason Heo
Jason Heo

Reputation: 10236

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.

Upvotes: 4

Related Questions