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