From: http://www.shuaizhu.com/wordpress/windows%E4%B8%8Bmysql%E6%97%A5%E5%BF%97%E5%BC%80%E5%90%AF%E4%B8%8E%E6%9F%A5%E8%AF%A2/
Modify the my. ini file
Add the following statement (if not set)
Log-error = D:/log/MySQL/mysql_log_err.txt
Log = D:/log/MySQL/mysql_log.txt
# Log-bin = D:/log/MySQL/mysql_log_bin
Log-Slow-queries = D:/log/MySQL/mysql_log_slow.txt
Run the following command to check whether logs are enabled:
Mysql> show variables like 'Log _ % ';
Others:
Reference: http://www.phpfans.net/article/htmls/201008/MjkzMTE0.html
1.
The error log records the problems that occur when you start, run, or stop mysqld.
My. ini configuration information:
# Enter a name for the error log file. Otherwise a default name will be used.
# Log-error = D:/mysql_log_err.txt
2.
Query the Client Connection established by log records and the statements executed.
My. ini configuration information:
# Enter a name for the query log file. Otherwise a default name will be used.
# Log = D:/mysql_log.txt
3.
Statement used to update log records and change data. This log is not supported.
My. ini configuration information:
# Enter a name for the update log file. Otherwise a default name will be used.
# Log-update = D:/mysql_log_update.txt
4.
Binary logs record all statements for changing data. It is also used for replication.
My. ini configuration information:
# Enter a name for the binary log. Otherwise a default name will be used.
# Log-bin = D:/mysql_log_bin
5.
Slow logs record all queries whose execution time exceeds long_query_time seconds or where no index is used.
My. ini configuration information:
# Enter a name for the slow query log file. Otherwise a default name will be used.
# Long_query_time = 1
# Log-Slow-queries = D:/mysql_log_slow.txt