1st Step is to edit your my.cnf file which is located in your /etc directory.
vi /etc/my.cnf
Plain 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=1
Plain 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.log
Plain TextChange the ownership of the file to be owned by MySQL.
chown mysql.mysql /var/log/mysql/slow-queries.log
Plain TextLastly, you will need to restart mysqld for your changes to take place.
service mysqld restart
Plain TextNow you should have slow query logs enabled catching any MySQL query that took longer then 1 second to process.