Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

What do I need to do to generate the slow logs file in MySQL?

I did:

 log_slow_queries  = C:\Program Files\MySQL\MySQL Server 5.1\mysql-slow.log 
 long_query_time  = 1 

What more do I need to do to?

share|improve this question

1 Answer

Seeing the path of the slow log is for Windows, I suggest putting quotes around the path

[mysqld]
log_slow_queries  = "C:\Program Files\MySQL\MySQL Server 5.1\mysql-slow.log"
long_query_time  = 1 

also make sure the lines are under the [mysqld] group header

The only thing left to do is restart mysql

run this

C:\> net stop mysql

wait about 30 seconds, then run

C:\> net start mysql

If this does not work, perhaps try flipping the slashes in the path

[mysqld]
log_slow_queries  = "C:/Program Files/MySQL/MySQL Server 5.1/mysql-slow.log"
long_query_time  = 1 

Give it a Try !!!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.