DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info) query-log

Info Catalog (mysql.info) error-log (mysql.info) log-files (mysql.info) binary-log
 
 5.12.2 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, and it logs each SQL statement received from clients. The
 general query log can be very useful when you suspect an error in a
 client and want to know exactly what the client sent to `mysqld'.
 
 `mysqld' writes statements to the query log in the order that it
 receives them. This may be different from the order in which they are
 executed. This is in contrast to the the binary log, for which
 statements are written after they are executed, but before any locks
 are released. (Also, the query log contains all statements, whereas the
 binary log does not contain statements that only select data.)
 
 To enable the general query log, start `mysqld' with the
 -log[=FILE_NAME] or -l [FILE_NAME] option. If no FILE_NAME value is
 given, the default name is `HOST_NAME.log' in the data directory.
 
 Server restarts and log flushing do not cause a new general query log
 file to be generated (although flushing closes and reopens it). On
 Unix, you can rename the file and create a new one by using the
 following commands:
 
      shell> mv HOST_NAME.log HOST_NAME-old.log
      shell> mysqladmin flush-logs
      shell> cp HOST_NAME-old.log BACKUP-DIRECTORY
      shell> rm HOST_NAME-old.log
 
 On Windows, you cannot rename the log file while the server has it
 open. You must stop the server and rename the file, and then restart
 the server to create a new log file.
 
Info Catalog (mysql.info) error-log (mysql.info) log-files (mysql.info) binary-log
automatically generated byinfo2html