Bug #79859 Wrong default error log path or missing error log file
Submitted: 6 Jan 2016 11:17 Modified: 9 Sep 2018 12:39
Reporter: Shahriyar Rzayev Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.7.10 OS:CentOS (7)
Assigned to: CPU Architecture:Any

[6 Jan 2016 11:17] Shahriyar Rzayev
Description:
Hi dear All,
I have installed MySQL 5.7.10 from yum repo on CentOS 7.

As documentation states:
http://dev.mysql.com/doc/refman/5.7/en/error-log.html

"It is common for Yum or APT package installations to configure the error log location to be under /var/log with an entry like log-error=/var/log/mysqld.log in a server configuration file; removing the filename from the entry reverts the error log location back to its default setting, which is the data directory."

Ok let's remove file name entry as:

log-error=
pid-file=/var/run/mysqld/mysqld.pid

Restart MySQL and check error log path:

mysql> select @@log_error;
+----------------------------+
| @@log_error                |
+----------------------------+
| /var/run/mysqld/mysqld.err |
+----------------------------+
1 row in set (0,00 sec)

So it is not reverted back to datadir.

Second issue just comment error log path:

#log-error=
pid-file=/var/run/mysqld/mysqld.pid

Restart MySQL:
systemctl restart mysqld.service

mysql> select @@log_error;
+-------------+
| @@log_error |
+-------------+
| stderr      |
+-------------+
1 row in set (0,00 sec)

We are completely missing error log file now.
Seems to be regression of -> https://bugs.mysql.com/bug.php?id=77977

But for my situation it is not a Windows service but CentOS 7 service.

How to repeat:
See description.

Suggested fix:
As it was before, if log-error entry is missing from my.cnf create error log as host_name+.err.
[9 Aug 2018 12:39] MySQL Verification Team
HI,

Thank you for your report.

First of all, you are using 5.7.10, while current version is 5.7.22. Hence, behaviour has possibly changed, which is why we can not accept bug reports for some archaic release.

Next, if you put something like this in your configuration file:

log-error=
pid-file=/var/run/mysqld/mysqld.pid

then you will get results as you have pointed out. If you are setting a variable, it should be set properly, to some value, otherwise it is expected to get what you got.

Finally, if you do not specify the location of the error log, then MySQL server can not know where it went. However, mysql.service script will direct your STDERR to some file. So, take a look at the script.

So far, this is all expected behaviour.
[10 Sep 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".