DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(mysql.info.gz) Query log

Info Catalog (mysql.info.gz) Error log (mysql.info.gz) Log Files (mysql.info.gz) Update log
 
 5.9.2 The General Query Log
 ---------------------------
 
 If you want to know what happens within `mysqld', you should start it
 with the `--log[=FILE_NAME]' or `-l [FILE_NAME]' option.  If no
 FILE_NAME value is given, the default name is `HOST_NAME.log' This will
 log all connections and statements to the log file.  This log can be
 very useful when you suspect an error in a client and want to know
 exactly what the client sent to `mysqld'.
 
 Older versions of the `mysql.server' script (from MySQL 3.23.4 to
 3.23.8) pass a `--log' option to `safe_mysqld' to enable the general
 query log.  If you need better performance when you start using MySQL
 in a production environment, you can remove the `--log' option from
 `mysql.server' or change it to `--log-bin'.  Binary log.
 
 `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 update log and the binary log,
 which are written after the query is executed, but before any locks are
 released.  (The query log also contains all statements, whereas the
 update and binary logs do not contain statements that only select data.)
 
 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 hostname.log hostname-old.log
      shell> mysqladmin flush-logs
      shell> cp hostname-old.log to-backup-directory
      shell> rm hostname-old.log
 
 On Windows, you cannot rename the log file while the server has it open.
 You must stop the server and rename the log. Then restart the server to
 create a new log.
 
Info Catalog (mysql.info.gz) Error log (mysql.info.gz) Log Files (mysql.info.gz) Update log
automatically generated byinfo2html