Is it possible for me to turn on audit logging on my mysql database?
I basically want to monitor all queries for an hour, and dump the log to a file.
Is it possible for me to turn on audit logging on my mysql database?
I basically want to monitor all queries for an hour, and dump the log to a file.
Quick way to enable MySQL General Query Log without restarting.
I have installed mysql through homebrew, mysql version : mysql Ver 14.14 Distrib 5.7.15, for osx10.11 (x86_64) using EditLine wrapper
For the record, general_log and slow_log were introduced in 5.1.6:
http://dev.mysql.com/doc/refman/5.1/en/log-destinations.html
In case using AWS RDS MYSQL, step by step guide here.
When set as 'file' output you can view the log directly from AWS RDS "Log" Console.
AWS RDS MYSQL Logging
(Note: For mysql-5.6+ this won't work. There's a solution that applies to mysql-5.6+ if you scroll down or click here.)
If you don't want or cannot restart the MySQL server you can proceed like this on your running server:
mysql
database