1st Step is to edit your my.cnf file which is located in your /etc directory.
vi /etc/my.cnfPlain TextOnce you have your my.cnf file open, then add the following 4 lines then save and exit the file.
[mysqld]
log-slow-queries
log-slow-queries=/var/log/mysql/slow-queries.log
long_query_time=1Plain TextThen create the file slow-queries.log. You can have the file in any spot you wish, as long as you define the path in your my.cnf.
touch /var/log/mysql/slow-queries.logPlain TextChange the ownership of the file to be owned by MySQL.
chown mysql.mysql /var/log/mysql/slow-queries.logPlain TextLastly, you will need to restart mysqld for your changes to take place.
service mysqld restartPlain TextNow you should have slow query logs enabled catching any MySQL query that took longer then 1 second to process.