Enable MySQL query log on Mac OSX

  1. Create my.cnf:

    $ sudo vim /etc/my.cnf
    
  2. Add this to my.cnf:

    [server]
    log=/private/var/log/mysql_query.log
    
  3. Create log file:

    $ sudo touch /var/log/mysql-query.log
    $ sudo chown _mysql /var/log/mysql-query.log
    
  4. Restart MySQL through MySQL Preference Pane.