Enable MySQL Slow Log Query without restarting
So sometimes in the midst of trying to find out what’s went wrong with our mysql query and why is it so slow, we enable mysql slow query log.
Without having to restart your mysql daemon, here’s what you can do (if you’re running MYSQL 5.1 and above):
# In your mysql console
> SET GLOBAL slow_query_log = 'ON';
> FLUSH LOGS;
Now head on over to /var/log/mysql/ and find your logs!
Source: Stackoverflow