Documentation Home
MySQL 9.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 41.2Mb
PDF (A4) - 41.3Mb
Man Pages (TGZ) - 262.8Kb
Man Pages (Zip) - 368.8Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb


7.4.2 The Error Log

This section discusses how to configure the MySQL server for logging of diagnostic messages to the error log. For information about selecting the error message character set and language, seeSection 12.6, “Error Message Character Set”, andSection 12.12, “Setting the Error Message Language”.

The error log contains a record ofmysqld startup and shutdown times. It also contains diagnostic messages such as errors, warnings, and notes that occur during server startup and shutdown, and while the server is running. For example, ifmysqld notices that a table needs to be automatically checked or repaired, it writes a message to the error log.

Depending on error log configuration, error messages may also populate the Performance Schemaerror_log table, to provide an SQL interface to the log and enable its contents to be queried. SeeSection 29.12.22.3, “The error_log Table”.

On some operating systems, the error log contains a stack trace ifmysqld exits abnormally. The trace can be used to determine wheremysqld exited. SeeSection 7.9, “Debugging MySQL”.

If used to startmysqld,mysqld_safe may write messages to the error log. For example, whenmysqld_safe notices abnormalmysqld exits, it restartsmysqld and writes amysqld restarted message to the error log.

The following sections discuss aspects of configuring error logging.