Log every MySQL query to a file by enabling the General Log in MAMP
I tried running the command SET GLOBAL general_log = 'ON';
to see if I could get it to work that way. This produced an error message File Not Found
, even though the file did exist.
This indicated to me that problem may be due to file permissions.
After some playing around, I changed:
- the owner of the file to match the user that the MySQL service was being run under, and
- gave that user "write access" to the file
Since making those changes, it's been working perfectly ever since.