0

All, for a small application of mine on localhost, with MySQL installed by XAMPP under Win10, I'm trying to capture all queries. The sql below worked for a short while, but no longer is doing so, although it does report the overhead, shown below underneath the SQL.

I've tried stopping and restarting MySQL to no avail.

Any help is appreciated.

SET GLOBAL slow_query_log_file = 'C:/xampp/mysql/localhost-slow.log';
SET SESSION long_query_time = 0;
SET GLOBAL slow_query_log = 'ON';

Contents of log file:

Time                 Id Command    Argument
# Time: 170813 16:56:49
# User@Host: root[root] @ localhost [127.0.0.1]
# Thread_id: 9521  Schema:   QC_hit: No
# Query_time: 0.000251  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0
# Rows_affected: 0
SET timestamp=1502657809;
SET GLOBAL slow_query_log = 'ON';
# User@Host: root[root] @ localhost [127.0.0.1]
# Thread_id: 9521  Schema:   QC_hit: No
# Query_time: 0.000461  Lock_time: 0.000035  Rows_sent: 1  Rows_examined: 1
# Rows_affected: 0
SET timestamp=1502657809;
SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';
# User@Host: root[root] @ localhost [127.0.0.1]
# Thread_id: 9521  Schema:   QC_hit: No
# Query_time: 0.000002  Lock_time: 0.000000  Rows_sent: 1  Rows_examined: 0
# Rows_affected: 0
SET timestamp=1502657809;
# administrator command: Quit;
Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
user1032402
  • 410
  • 1
  • 3
  • 11

1 Answers1

0

use this

[mysqld]
general_log = on

general_log_file=/usr/log/general.log

in your my.cnf / my.ini file

xampp: c:\xampp\mysql\bin\my.ini.

a basnet
  • 17
  • 5