The General Query Log
- The general query log is a general record of what
mysqld is doing.
- The server writes information to this log when clients connect or disconnect.
- It logs each SQL statement received from clients.
- The general query log can be very useful in understanding what exactly the client sent to
mysqld.
- To enable the general query log, start
mysqld with the --log[=name].
- If no name value is given,
mysqld uses the hostname followed by .log and writes the file in the data directory.
- Server restarts and log flushing do not cause a new general query log file to be generated.
mysqld writes statements to the query log in the order that it receives them.
- This may differ from the order in which they are executed.
- This logging order differs from the binary log, for statements are written after they are executed but before any locks are released.
What does the binary log contain?
© 2007 John Michael Pierobon
Notes