-
In your vagrant box edit
/etc/mysql/my.cnf
-
uncomment these two lines
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
-
restart your vagrant box
-
all queries will now be logged to
/var/log/mysql/mysql.log
- note that you will have to open a root shell to access this file
-
(optionally) copy the log file somewhere
# cat /var/log/mysql/mysql.log > /vagrant/sites/codeup.dev/logs/mysql.log