MySQL Server has several logs that can help you find out what activity is taking place.
|Log Type||Information Written to Log|
|Error log||Problems encountered starting, running, or stopping mysqld|
|ISAM log||Changes to the |
|General query log||Established client connections and statements received from clients|
|Update log||Statements that change data (this log is deprecated)|
|Binary log||Statements that change data (also used for replication)|
|Relay log||Data changes received from a replication master server|
|Slow query log||Queries that took more than
By default, all log files are created in the data directory. You can
force the server to close and reopen the log files (or in some cases
switch to a new log file) by flushing the logs. Log flushing occurs
when you issue a
LOGS statement or execute a mysqladmin
flush-logs, mysqladmin refresh,
mysqldump --flush-logs, or mysqldump
--master-data command. See Section 184.108.40.206, “FLUSH Syntax”,
Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”, and Section 4.5.4, “mysqldump — A Database Backup Program”. In
addition, the binary log is flushed when its size reaches the value
The relay log is used only on slave replication servers, to hold data changes from the master server that must also be made on the slave. For discussion of relay log contents and configuration, see Section 14.3.2, “The Slave Relay Log”.
For information about log maintenance operations such as expiration of old log files, see Section 5.3.6, “Server Log Maintenance”.
See Section 220.127.116.11, “Administrator Guidelines for Password Security”, for information about keeping logs secure.