Sometimes during development I need to see what SQL queries are executed and listing them in Console.app is maybe the most convenient solution on OSX.
To see queries in Console
I just created /etc/mysql/my.cnf with:
[mysqld] general_log = 1 # general_log_file = /usr/local/mysql/data/mysqld.query.log general_log_file = /var/log/mysql/mysqld.query.log slow_query_log = 1 long_query_time = 1 # second # slow_query_log_file = /usr/local/mysql/data/mysqld.slow.log slow_query_log_file = /var/log/mysql/mysqld.slow.log log_queries_not_using_indexes = 0
MySQL server needs own permissions on the parent log dir so:
sudo mkdir /var/log/mysql sudo chown -R _mysql:_mysql /var/log/mysql
Last step is server restart.
sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
On a Linux machine I use multitail as an alternative.