MySQL has several different log files that can help you find out
what is going on inside mysqld:
By default, all log files are created in the
mysqld data directory. You can force
mysqld to close and reopen the log files (or in
some cases switch to a new log) by flushing the logs. Log flushing
occurs when you issue a FLUSH LOGS
statement or
execute mysqladmin flush-logs or
mysqladmin refresh. See
Section 13.5.5.2, “FLUSH
Syntax”.
If you are using MySQL replication capabilities, slave replication
servers maintain additional log files called relay logs. These are
discussed in Chapter 6, Replication.
As of MySQL 5.1.6, the server can write general query and slow
query entries to log tables, log files, or both. For details, see
Section 5.11.1, “Server Log Tables”.