Blame SOURCES/mysql.service.in

2aefdf
# It's not recommended to modify this file in-place, because it will be
2aefdf
# overwritten during package upgrades.  If you want to customize, the
2aefdf
# best way is to use systemctl edit:
2aefdf
#
2aefdf
# $ systemctl edit @DAEMON_NAME@.service
2aefdf
#
2aefdf
# this will create file
2aefdf
#
2aefdf
#  /etc/systemd/system/@DAEMON_NAME@.service.d/override.conf
2aefdf
#
2aefdf
# which be parsed after the file @DAEMON_NAME@.service itself is parsed.
2aefdf
#
2aefdf
# For example, if you want to increase mysql's open-files-limit to 20000
2aefdf
# add following when editing with command above:
2aefdf
#
2aefdf
#	[Service]
2aefdf
#	LimitNOFILE=20000
2aefdf
#
2aefdf
# Or if you require to execute pre and post scripts in the unit file as root, set
2aefdf
#       PermissionsStartOnly=true
2aefdf
#
2aefdf
# For more info about custom unit files, see systemd.unit(5) or
2aefdf
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
2aefdf
#
2aefdf
# Don't forget to reload systemd daemon after you change unit configuration:
2aefdf
# root> systemctl --system daemon-reload
2aefdf
2aefdf
[Unit]
2aefdf
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
2aefdf
After=syslog.target
2aefdf
After=network.target
2aefdf
2aefdf
[Service]
2aefdf
Type=notify
2aefdf
User=mysql
2aefdf
Group=mysql
2aefdf
2aefdf
ExecStartPre=@libexecdir@/mysql-check-socket
2aefdf
ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n
2aefdf
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
2aefdf
# per bug #547485
2aefdf
ExecStart=@libexecdir@/mysqld --basedir=@prefix@
2aefdf
ExecStartPost=@libexecdir@/mysql-check-upgrade
2aefdf
ExecStopPost=@libexecdir@/mysql-wait-stop
2aefdf
2aefdf
# Give a reasonable amount of time for the server to start up/shut down
2aefdf
TimeoutSec=300
2aefdf
2aefdf
# Place temp files in a secure directory, not /tmp
2aefdf
PrivateTmp=true
2aefdf
2aefdf
Restart=on-failure
2aefdf
2aefdf
RestartPreventExitStatus=1
2aefdf
2aefdf
# Sets open_files_limit
2aefdf
LimitNOFILE = 10000
2aefdf
2aefdf
# Set enviroment variable MYSQLD_PARENT_PID. This is required for SQL restart command.
2aefdf
Environment=MYSQLD_PARENT_PID=1
2aefdf
2aefdf
[Install]
2aefdf
WantedBy=multi-user.target