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
Norvald H. Ryeng 2f29560
# best way is to use systemctl edit:
Norvald H. Ryeng 2f29560
#
Norvald H. Ryeng 2f29560
# $ systemctl edit @DAEMON_NAME@.service
Norvald H. Ryeng 2f29560
#
Norvald H. Ryeng 2f29560
# this will create file
Norvald H. Ryeng 2f29560
#
Norvald H. Ryeng 2f29560
#  /etc/systemd/system/@DAEMON_NAME@.service.d/override.conf
Norvald H. Ryeng 2f29560
#
Norvald H. Ryeng 2f29560
# which be parsed after the file @DAEMON_NAME@.service itself is parsed.
Norvald H. Ryeng 2f29560
#
Norvald H. Ryeng 2f29560
# For example, if you want to increase mysql's open-files-limit to 20000
Norvald H. Ryeng 2f29560
# add following when editing with command above:
75032c4
#
7a5573f
#	[Service]
Norvald H. Ryeng 2f29560
#	LimitNOFILE=20000
Norvald H. Ryeng 2f29560
#
bd72127
# Or if you require to execute pre and post scripts in the unit file as root, set
bd72127
#       PermissionsStartOnly=true
Norvald H. Ryeng 2f29560
#
Norvald H. Ryeng 2f29560
# For more info about custom unit files, see systemd.unit(5) or
Norvald H. Ryeng 2f29560
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
Norvald H. Ryeng 2f29560
#
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]
Norvald H. Ryeng 2f29560
Type=notify
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
Norvald H. Ryeng 2f29560
ExecStart=@bindir@/mysqld --basedir=@prefix@
0d2208e
ExecStartPost=@libexecdir@/mysql-check-upgrade
9abc751
ExecStopPost=@libexecdir@/mysql-wait-stop
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
1998188
Restart=on-failure
1998188
1998188
RestartPreventExitStatus=1
1998188
Norvald H. Ryeng 2f29560
# Sets open_files_limit
Norvald H. Ryeng 2f29560
LimitNOFILE = 10000
Norvald H. Ryeng 2f29560
Norvald H. Ryeng 2f29560
# Set enviroment variable MYSQLD_PARENT_PID. This is required for SQL restart command.
Norvald H. Ryeng 2f29560
Environment=MYSQLD_PARENT_PID=1
Norvald H. Ryeng 2f29560
7a5573f
[Install]
7a5573f
WantedBy=multi-user.target