To enable slow query log in MySQL

Create the file mysql-slow.log in /var/log/ directory.

Add the following entries in /etc/my.cnf

log-slow-queries = /var/log/mysql-slow.log
long_query_time = 1

restart mysql service.

Leave a comment