Hide Forgot
Description of problem: In order to increase the amount of open files allowed in mysql, one has to enter LimitNOFILE in mysqld.service as the value of open-files-limit is not read from my.cnf any more. On upgrading mysql, the mysqld.service file is overwritten, losing any changes. Version-Release number of selected component (if applicable): Any version included in fc14 onwards. How reproducible: Always on upgrade/update. Steps to Reproduce: 1.Edit mysqld.service adding LimitNOFILE (or supposedly anything else) 2.Upgrade to newer version 3. Actual results: Changes are lost as the mysqld.service file is overwritten. Expected results: Changes are kept and mysqld.service is created as .rpmnew or similar. Additional info: This has happened on fc14/fc15/fc16. I am unsure if this should be classified under mysql or systemd, but I have chosen the former assuming this could be fixed in the packaging of said RPM.
This is not a bug; you are not supposed to modify systemd service files directly. The correct procedure for making a custom service definition is to create your own file in /lib/systemd/system/. You can just copy-and-paste the system-supplied version, but it's probably a better plan to "include" the supplied version and then define just the settings you need.
(In reply to comment #1) > The correct procedure for making a custom service definition is to > create your own file in /lib/systemd/system/. This was a typo probably, you should use /etc/systemd/system/ for your locally modified unit files. For more info see: https://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F