Tuesday
11
Jan 2005

Query logging in MySQL on Windows

(10:40 pm) Tags: [Software, How do I...]

So, you’re running MySQL on Windows, and would really like to see a log of all of the queries the server is processing? Simple, just find your my.ini file, open it in a text editor, and add the following line in the [mysqld] section:

[mysqld]
log=hostname.log

Then restart the mysql service, and every query will be logged in a file called hostname.log in the MySql\data directory.

For you unix types, starting the mysqld daemon with the ‘–log’ parameter will create the file ‘hostname.log’ in the $MYSQL_HOME/data directory.

Popularity: 21%

Comments: (2)