Blame SOURCES/mysql.service.in

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