Enable slow query log on MySQL server
Set it temporarily, by running the following commands on mysql console: set global slow_query_log = 1; set global slow_query_log_file = ‘/var/log/mysql-slow.log’; the changes will be undone when mysql is restarted. Set it permanently, by adding the following in “my.cnf” file: slow-query-log=1 slow-query-log-file=/var/log/mysql-slow.log The location of my.cnf varies by OS, but is often found in /etc/my.cnf,