Bug #86466 mysqld_pre_systemd script does not get error log from custom my.cnf
Submitted: 25 May 2017 22:15 Modified: 9 Jun 2017 16:17
Reporter: Vlad Safronov Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.7.18 OS:Oracle Linux (OL7)
Assigned to: CPU Architecture:Any
Tags: systemd

[25 May 2017 22:15] Vlad Safronov

/usr/bin/mysqld_pre_systemd file from mysql-commercial-server-5.7.18-1.1.el7.x86_64 rpm package
can not grep error log from custom my.cnf, because it greps for log-error, not log_error: 

log=$(get_option mysqld log-error "/var/log/mysql${instance:+-$instance}.log" $instance)

How to repeat:
/usr/bin/my_print_defaults --defaults-file=/export/home/custom.cnf mysqld |grep log-error

Suggested fix:
Fix /usr/bin/mysqld_pre_systemd, use log_error:

log=$(get_option mysqld log_error "/var/log/mysql${instance:+-$instance}.log" $instance)
[9 Jun 2017 16:17] Paul Dubois
Posted by developer:
Fixed in 5.7.20, 8.0.2.

The mysqld_pre_systemd script in RPM packages found the error log
setting in option files if specified as log-error but not as
log_error, though both are permitted.