Quick way to enable MySQL General Query Log without restarting

If you want to quickly enable the MySQL General Query Log without restarting MySQL Server, you can run these couple queries to start outputting all queries to a file located on disk

You can then run a command like “tail -f /var/log/mysql/all.log”┬áto see the queries appear as your application runs.┬áNote never enable this on anything other than a development environment, and make sure to turn it off once you are finished debugging or the disk will fill up

Add comment