Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling query log in MySQL 5 on Windows 7

Tags:

mysql

windows

How do I do it? I want all queries logged, don't care about the performance hit. The docs say I need to start mysqld with -l but I can't change the parameters when editing this service.

like image 874
A-OK Avatar asked Jan 19 '11 02:01

A-OK


2 Answers

You can set the option in the my.cnf (possibly my.ini) file, wherever it happens to get installed on your machine. Command line arguments are more for a one-time override, while the my.cnf is for permanent settings.

like image 60
Marc B Avatar answered Oct 13 '22 00:10

Marc B


  my.ini 

\# SERVER SECTION

\# ----------------------------------------------------------------------

\# The following options will be read by the MySQL Server. Make sure that

\# you have installed the server correctly (see above) so it reads this 

\# file.

[mysqld]

add

log=filename.log

or u can set a Absolute Path of ,please new the new file ;

below [mysqld]

and u will find Program Data\mysql\MySQL Server 5.1\data or I really recommand that using everything to search "filename.log "

in cmd

 net stop mysql

 net start mysql
like image 27
phil Avatar answered Oct 13 '22 02:10

phil