|
|
665d94 |
# Multi instance version of mariadb. For if you run mutiple verions at once.
|
|
|
665d94 |
# Also used for @DAEMON_NAME@@bootstrap to bootstrap Galera.
|
|
|
665d94 |
#
|
|
|
665d94 |
# To use multi instance variant, use [mysqld.INSTANCENAME] as sections in my.cnf
|
|
|
665d94 |
# and start the service via:
|
|
|
665d94 |
# systemctl start @DAEMON_NAME@@{instancename}.server
|
|
|
665d94 |
#
|
|
|
665d94 |
# It's not recommended to modify this file in-place, because it will be
|
|
|
665d94 |
# overwritten during package upgrades. If you want to customize, the
|
|
|
665d94 |
# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service",
|
|
|
665d94 |
# containing
|
|
|
665d94 |
# .include /usr/lib/systemd/system/@DAEMON_NAME@.service
|
|
|
665d94 |
# ...make your changes here...
|
|
|
665d94 |
# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf",
|
|
|
665d94 |
# which doesn't need to include ".include" call and which will be parsed
|
|
|
665d94 |
# after the file @DAEMON_NAME@.service itself is parsed.
|
|
|
665d94 |
#
|
|
|
665d94 |
# For more info about custom unit files, see systemd.unit(5) or
|
|
|
665d94 |
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
|
|
|
665d94 |
|
|
|
665d94 |
# For example, if you want to increase mysql's open-files-limit to 10000,
|
|
|
665d94 |
# you need to increase systemd's LimitNOFILE setting, so create a file named
|
|
|
665d94 |
# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing:
|
|
|
665d94 |
# [Service]
|
|
|
665d94 |
# LimitNOFILE=10000
|
|
|
665d94 |
|
|
|
665d94 |
# Note: /usr/lib/... is recommended in the .include line though /lib/...
|
|
|
665d94 |
# still works.
|
|
|
665d94 |
# Don't forget to reload systemd daemon after you change unit configuration:
|
|
|
665d94 |
# root> systemctl --system daemon-reload
|
|
|
665d94 |
|
|
|
665d94 |
# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance.
|
|
|
665d94 |
|
|
|
665d94 |
[Unit]
|
|
|
665d94 |
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
|
|
|
665d94 |
Documentation=man:mysqld(8)
|
|
|
665d94 |
Documentation=https://mariadb.com/kb/en/library/systemd/
|
|
|
665d94 |
After=network.target
|
|
|
665d94 |
|
|
|
665d94 |
[Install]
|
|
|
665d94 |
WantedBy=multi-user.target
|
|
|
665d94 |
Alias=mysql.service
|
|
|
665d94 |
Alias=mysqld.service
|
|
|
665d94 |
|
|
|
665d94 |
[Service]
|
|
|
665d94 |
Type=notify
|
|
|
665d94 |
User=mysql
|
|
|
665d94 |
Group=mysql
|
|
|
665d94 |
|
|
|
665d94 |
ExecStartPre=@libexecdir@/mysql-check-socket --defaults-group-suffix=.%I
|
|
|
665d94 |
ExecStartPre=@libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n
|
|
|
665d94 |
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf
|
|
|
665d94 |
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
|
|
665d94 |
# per bug #547485
|
|
|
665d94 |
ExecStart=@libexecdir@/mysqld --defaults-group-suffix=.%I --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
|
|
|
665d94 |
ExecStartPost=@libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I
|
|
|
665d94 |
|
|
|
665d94 |
# Setting this to true can break replication and the Type=notify settings
|
|
|
665d94 |
# See also bind-address mysqld option.
|
|
|
665d94 |
PrivateNetwork=false
|
|
|
665d94 |
|
|
|
665d94 |
KillMode=process
|
|
|
665d94 |
KillSignal=SIGTERM
|
|
|
665d94 |
|
|
|
665d94 |
# Don't want to see an automated SIGKILL ever
|
|
|
665d94 |
SendSIGKILL=no
|
|
|
665d94 |
|
|
|
665d94 |
# Restart crashed server only, on-failure would also restart, for example, when
|
|
|
665d94 |
# my.cnf contains unknown option
|
|
|
665d94 |
Restart=on-abort
|
|
|
665d94 |
RestartSec=5s
|
|
|
665d94 |
|
|
|
665d94 |
UMask=007
|
|
|
665d94 |
|
|
|
665d94 |
# Give a reasonable amount of time for the server to start up/shut down
|
|
|
665d94 |
TimeoutSec=300
|
|
|
665d94 |
|
|
|
665d94 |
# Place temp files in a secure directory, not /tmp
|
|
|
665d94 |
PrivateTmp=true
|