Chapter 16. Logging and Replication

When changes are made to the database mysqld writes to binary logs, which are used in the replication process. Much of this chapter concerns configuration options that are used to manage both logging and replication. These options can be configured from server startup using the command line or set in the configuration file. Unless the material specifically says that an option can only be configured from the command line or the configuration file, either method is possible. In addition, many of the configuration options can be controlled at server runtime.

Log Files

Four log files are used by mysqld: the error log, the binary log, the general query log, and the slow query log. A fifth log type, the relay log, is used by a slave server. If the logs are enabled, mysqld writes them to the data directory unless otherwise specified. By default, no logging is enabled.

Note

If you find that an error log is being written to when the configuration file does not enable the error log, there is no need to worry. Some startup scripts specify error log files. These startup scripts are dependent upon the installation.

Error log

The error log contains entries for when the mysqld daemon started and stopped and also any critical errors that occur while the server is running.

Information such as when the event scheduler executes an event and when replication starts and stops is also ...

Get MySQL® Administrator's Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.