|
|
ebd438 |
# Multi instance version of MariaDB. For if you run mutiple verions at once.
|
|
|
ebd438 |
# Also used for @DAEMON_NAME@@bootstrap to bootstrap Galera.
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in
|
|
|
ebd438 |
# @sysconfdir@/@my.cnf to change per instance settings. A minimumal necessary
|
|
|
ebd438 |
# configuration items to change to avoid conflicts between instances is:
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# [mariadbd.instancename]
|
|
|
ebd438 |
# # TCP port to make available for clients
|
|
|
ebd438 |
# port=3306
|
|
|
ebd438 |
# # Socket to make available for clients
|
|
|
ebd438 |
# socket=/tmp/mariadb-instancename.sock
|
|
|
ebd438 |
# # Where MariaDB should store all its data
|
|
|
ebd438 |
# datadir=/usr/local/mariadb-instancename/data
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# and start the service via:
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# root> systemctl start @DAEMON_NAME@@{instancename}.server
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# It's not recommended to modify this file in-place, because it will be
|
|
|
ebd438 |
# overwritten during package upgrades. If you want to customize, for
|
|
|
ebd438 |
# all instances, the best way is:
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# root> systemctl edit @DAEMON_NAME@@.service
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# Then add additonal directives under a section (probably [Service]).
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# If you only want to change a specific instance:
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# root> systemctl edit @DAEMON_NAME@@{instancename}.server
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# For more info about custom unit files, see systemd.unit(5) or
|
|
|
ebd438 |
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# For example, if you want to increase MariaDB's open-files-limit to 10000,
|
|
|
ebd438 |
# you need to increase systemd's LimitNOFILE setting, use the contents below:
|
|
|
ebd438 |
#
|
|
|
ebd438 |
# [Service]
|
|
|
ebd438 |
# LimitNOFILE=10000
|
|
|
ebd438 |
|
|
|
ebd438 |
[Unit]
|
|
|
ebd438 |
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
|
|
|
ebd438 |
Documentation=man:mariadbd(8)
|
|
|
ebd438 |
Documentation=https://mariadb.com/kb/en/library/systemd/
|
|
|
ebd438 |
After=network.target
|
|
|
ebd438 |
|
|
|
ebd438 |
[Install]
|
|
|
ebd438 |
WantedBy=multi-user.target
|
|
|
ebd438 |
Alias=mysql.service
|
|
|
ebd438 |
Alias=mysqld.service
|
|
|
ebd438 |
|
|
|
ebd438 |
[Service]
|
|
|
ebd438 |
Type=notify
|
|
|
ebd438 |
User=mysql
|
|
|
ebd438 |
Group=mysql
|
|
|
ebd438 |
|
|
|
ebd438 |
ExecStartPre=@libexecdir@/mariadb-check-socket --defaults-group-suffix=.%I
|
|
|
ebd438 |
ExecStartPre=@libexecdir@/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n
|
|
|
ebd438 |
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf
|
|
|
ebd438 |
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
|
|
ebd438 |
# per bug #547485
|
|
|
ebd438 |
ExecStart=@libexecdir@/mariadbd --defaults-group-suffix=.%I --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
|
|
|
ebd438 |
ExecStartPost=@libexecdir@/mariadb-check-upgrade --defaults-group-suffix=.%I
|
|
|
ebd438 |
|
|
|
ebd438 |
# Setting this to true can break replication and the Type=notify settings
|
|
|
ebd438 |
# See also bind-address MariaDB option.
|
|
|
ebd438 |
PrivateNetwork=false
|
|
|
ebd438 |
|
|
|
ebd438 |
KillSignal=SIGTERM
|
|
|
ebd438 |
|
|
|
ebd438 |
# Don't want to see an automated SIGKILL ever
|
|
|
ebd438 |
SendSIGKILL=no
|
|
|
ebd438 |
|
|
|
ebd438 |
# Restart crashed server only, on-failure would also restart, for example, when
|
|
|
ebd438 |
# my.cnf contains unknown option
|
|
|
ebd438 |
Restart=on-abort
|
|
|
ebd438 |
RestartSec=5s
|
|
|
ebd438 |
|
|
|
ebd438 |
UMask=007
|
|
|
ebd438 |
|
|
|
ebd438 |
# Give a reasonable amount of time for the server to start up/shut down
|
|
|
ebd438 |
TimeoutSec=300
|
|
|
ebd438 |
|
|
|
ebd438 |
# Place temp files in a secure directory, not /tmp
|
|
|
ebd438 |
PrivateTmp=true
|