mysql on davidchua https://dchua.com/tags/mysql/ Recent content in mysql on davidchua Hugo -- gohugo.io en-us Thu, 10 Apr 2014 00:00:00 +0000 Enable MySQL Slow Log Query without restarting https://dchua.com/posts/2014-04-10-enable-mysql-slow-log-query-without-restarting/ Thu, 10 Apr 2014 00:00:00 +0000 https://dchua.com/posts/2014-04-10-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!