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