Bug 1590369 - Move log to /var/log/mysql/mysqld.log
Summary: Move log to /var/log/mysql/mysqld.log
Alias: None
Product: Fedora
Classification: Fedora
Component: community-mysql
Version: 29
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-06-12 13:57 UTC by Honza Horak
Modified: 2018-11-10 03:18 UTC (History)
5 users (show)

Fixed In Version: community-mysql-8.0.13-1.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-11-10 03:18:27 UTC
Type: Bug

Attachments (Terms of Use)

Description Honza Horak 2018-06-12 13:57:30 UTC
Description of problem:
Having the error log file in /var/log means that when missing, daemon (running as mysql:mysql) cannot re-create it. It makes troubles when rotating logs, or when an admin removes it manually. In that case, admin is responsible for re-creating the empty log file now, with proper owner and SELinux context.

I'd like to propose moving the error log to a separate directory properly owned by mysql:mysql user, so daemon can re-created when missing. It's done similarly in mariadb already.

That obviously changes default behaviour, so we should only do it in F29 and further, and document it in Release Notes.. The expected changes are the following:

* For users who have done some changes in /etc/my.cnf.d/community-mysql-server.cnf, the config will stay to use /var/log/mysqld.log
* For users who have not done any changes in /etc/my.cnf.d/community-mysql-server.cnf, or install MySQL on a fresh machine, they will use /var/log/mysql/mysqld.log

So, the impact is not that the service would not start, it's just that some monitoring tools would need to re-configure.

Comment 1 Honza Horak 2018-06-12 13:58:36 UTC
Michal, Norvald, what do you think?

Comment 2 Norvald H. Ryeng 2018-06-13 08:33:49 UTC
I agree. Moving the log file to /var/log/mysql/ makes sense.

Comment 3 Jan Kurik 2018-08-14 11:22:32 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 4 Fedora Update System 2018-10-31 13:02:16 UTC
community-mysql-8.0.13-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c82fc3e109

Comment 5 Fedora Update System 2018-10-31 18:52:44 UTC
community-mysql-8.0.13-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c82fc3e109

Comment 6 Fedora Update System 2018-11-10 03:18:27 UTC
community-mysql-8.0.13-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.