--consoleis given, mysqld writes the error log to the console. (
--consoletakes precedence over
--log-errorif both are given, and the following items regarding
--log-errordo not apply. Prior to MySQL 5.7, this is reversed:
--log-errortakes precedence over
--log-erroris not given, or is given without naming a file, mysqld writes the error log to a file named
in the data directory, unless the
--pid-fileoption is specified. In that case, the file name is the PID file base name with a suffix of
.errin the data directory.
--log-erroris given to name a file, mysqld writes the error log to that file (with an
.errsuffix added if the name has no suffix), located under the data directory unless an absolute path name is given to specify a different location.
In addition, the server by default writes events and error messages to the Windows Event Log within the Application log:
Entries marked as
Noteare written to the Event Log, but not messages such as information statements from individual storage engines.
Event Log entries have a source of
Information written to the Event Log is controlled using the
log_syslogsystem variable, which on Windows is enabled by default. See Section 126.96.36.199, “Error Logging to the System Log”.