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