I have installed MySQL Community Edition 5.1.41 on a windows 2000 server. In my.ini file I have enabled slow query logging and have redirected the output to a table.I have set the long_query_time to 10 seconds. Then after running some queries I checked up the slow query log table and found that all the queries which were executed have been logged and a file called database-slow.log has also been created in the data folder. Can anybody please tell me where I am going wrong. I am using the inbuilt innodb and not activated the innodb plugin.
Thanks
Best Answer
For starters, I placed these lines in /etc/my.cnf
When you use the slow log with the log_output being TABLE, the table IS NOT created in /var/lib/mysql. The table is created in the mysql folder, /var/lib/mysql/mysql. The storage engine for the default table-based slow log is CSV. You can check this by doing the following:
You should see the table slow_log
Here is how to convert the CSV file for the slow log table to MyISAM
Keep in mind that the converted MyISAM does not have any indexes.
This is a column called 'start_time' which is a timestamp. Feel free to index it like this:
Let us know how this worked out, please !!!