in /etc/my.cnf
Under
[mysqld]
#New version (MySQL > 5)
general_log_file = /var/log/mysql-query.log
general_log = 1
#old version
log=/var/log/mysql-query.log
log-bin=mysql-bin
Do not forget to make file and set the permission 777 to this file mysql-query.log
and restart the mysql service by the following command
Service mysqld restart