--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.
It is common for Yum or APT package installations to configure
an error log file location under
with an option like
log-error=/var/log/mysqld.log in a server
configuration file. Removing the file name from the option
file in the data directory to be used.
If the server writes the error log to a file, the
log_error system variable
indicates the error log file name.