MySQL 5.7 Reference Manual Including MySQL NDB Cluster 7.5 and NDB Cluster 7.6
On Windows, mysqld uses the
--log-error,
--pid-file, and
--console options to determine
whether mysqld writes the error log to the
console or a file, and, if to a file, the file name:
If --console is given,
mysqld writes the error log to the
console. (--console takes
precedence over --log-error
if both are given, and the following items regarding
--log-error do not apply.
Prior to MySQL 5.7, this is reversed:
--log-error takes precedence
over --console.)
If --log-error is not given,
or is given without naming a file, mysqld
writes the error log to a file named
in the data directory, unless the
host_name.err--pid-file option is
specified. In that case, the file name is the PID file base
name with a suffix of .err in the data
directory.
If --log-error is given to
name a file, mysqld writes the error log
to that file (with an .err suffix added
if the name has no suffix). The file location is under the
data directory unless an absolute path name is given to
specify a different location.
If the server writes the error log to the console, it sets the
log_error system variable to
stderr. Otherwise, the server writes the
error log to a file and sets
log_error to the file name.
In addition, the server by default writes events and error messages to the Windows Event Log within the Application log:
Entries marked as Error,
Warning, and Note are
written to the Event Log, but not messages such as
information statements from individual storage engines.
Event Log entries have a source of MySQL.
Information written to the Event Log is controlled using the
log_syslog system variable,
which on Windows is enabled by default. See
Section 5.4.2.3, “Error Logging to the System Log”.