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