--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). The file location is under the data directory unless an absolute path name is given to specify a different location.
--log-erroris given in an option file in a
[mysqld_safe]section, on systems that use mysqld_safe to start the server, mysqld_safe finds and uses the option, and passes it to mysqld.
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 path name from the option
file in the data directory to be used.