|
|
031387 |
# It's not recommended to modify this file in-place, because it will be
|
|
|
031387 |
# overwritten during package upgrades. If you want to customize, the
|
|
|
031387 |
# best way is to create a file "/etc/systemd/system/mariadb.service",
|
|
|
031387 |
# containing
|
|
|
031387 |
# .include /lib/systemd/system/mariadb.service
|
|
|
031387 |
# ...make your changes here...
|
|
|
031387 |
# or create a file "/etc/systemd/system/mariadb.service.d/foo.conf",
|
|
|
031387 |
# which doesn't need to include ".include" call and which will be parsed
|
|
|
031387 |
# after the file mariadb.service itself is parsed.
|
|
|
031387 |
#
|
|
|
031387 |
# For more info about custom unit files, see systemd.unit(5) or
|
|
|
031387 |
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
|
|
|
031387 |
|
|
|
031387 |
# For example, if you want to increase mariadb's open-files-limit to 10000,
|
|
|
031387 |
# you need to increase systemd's LimitNOFILE setting, so create a file named
|
|
|
031387 |
# "/etc/systemd/system/mariadb.service.d/limits.conf" containing:
|
|
|
031387 |
# [Service]
|
|
|
031387 |
# LimitNOFILE=10000
|
|
|
031387 |
|
|
|
031387 |
# Note: /usr/lib/... is recommended in the .include line though /lib/...
|
|
|
031387 |
# still works.
|
|
|
031387 |
# Don't forget to reload systemd daemon after you change unit configuration:
|
|
|
031387 |
# root> systemctl --system daemon-reload
|
|
|
031387 |
|
|
|
031387 |
[Unit]
|
|
|
031387 |
Description=MariaDB database server
|
|
|
031387 |
After=syslog.target
|
|
|
031387 |
After=network.target
|
|
|
031387 |
|
|
|
031387 |
[Service]
|
|
|
031387 |
Type=simple
|
|
|
031387 |
User=mysql
|
|
|
031387 |
Group=mysql
|
|
|
031387 |
|
|
|
031387 |
ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n
|
|
|
031387 |
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
|
|
031387 |
# per bug #547485
|
|
|
031387 |
ExecStart=/usr/bin/mysqld_safe --basedir=/usr
|
|
|
031387 |
ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID
|
|
|
031387 |
|
|
|
031387 |
# Give a reasonable amount of time for the server to start up/shut down
|
|
|
031387 |
TimeoutSec=300
|
|
|
031387 |
|
|
|
031387 |
# Place temp files in a secure directory, not /tmp
|
|
|
031387 |
PrivateTmp=true
|
|
|
031387 |
|
|
|
031387 |
[Install]
|
|
|
031387 |
WantedBy=multi-user.target
|