Wednesday, July 4, 2012

MySQL Logging Queries

SQL statements sent to MySQL is logged in the general log file. By default, this log file is disabled. To switch it on, insert into my.cnf the following lines:

general_log=1
general_log_file=/var/log/mysql-general.log

Note: you will need to make sure the file/folder is writable by the user MySQL is running on.

No comments:

Post a Comment