4b7078
# It's not recommended to modify this file in-place, because it will be
4b7078
# overwritten during package upgrades.  If you want to customize, the
4b7078
# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service",
4b7078
# containing
4b7078
#	.include /usr/lib/systemd/system/@DAEMON_NAME@.service
4b7078
#	...make your changes here...
4b7078
# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf",
4b7078
# which doesn't need to include ".include" call and which will be parsed
4b7078
# after the file @DAEMON_NAME@.service itself is parsed.
4b7078
#
4b7078
# For more info about custom unit files, see systemd.unit(5) or
4b7078
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
4b7078
4b7078
# For example, if you want to increase mysql's open-files-limit to 10000,
4b7078
# you need to increase systemd's LimitNOFILE setting, so create a file named
4b7078
# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing:
4b7078
#	[Service]
4b7078
#	LimitNOFILE=10000
4b7078
4b7078
# Note: /usr/lib/... is recommended in the .include line though /lib/...
4b7078
# still works.
4b7078
# Don't forget to reload systemd daemon after you change unit configuration:
4b7078
# root> systemctl --system daemon-reload
4b7078
4b7078
[Unit]
4b7078
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
4b7078
After=syslog.target
4b7078
After=network.target
4b7078
4b7078
[Service]
4b7078
Type=simple
4b7078
User=mysql
4b7078
Group=mysql
4b7078
4b7078
ExecStartPre=@libexecdir@/mysql-check-socket
4b7078
ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n
4b7078
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
4b7078
# per bug #547485
4b7078
ExecStart=@bindir@/mysqld_safe --basedir=@prefix@
4b7078
ExecStartPost=@libexecdir@/mysql-wait-ready $MAINPID
4b7078
ExecStartPost=@libexecdir@/mysql-check-upgrade
4b7078
4b7078
# Give a reasonable amount of time for the server to start up/shut down
4b7078
TimeoutSec=300
4b7078
4b7078
# Place temp files in a secure directory, not /tmp
4b7078
PrivateTmp=true
4b7078
4b7078
[Install]
4b7078
WantedBy=multi-user.target