blob: d9ea74ebc3cc3cbccda565db66f2b400bd73c640 [file] [log] [blame]
[Unit]
Description=MySQL database server
[Service]
ExecStartPre=/bin/sh -c 'test "`ls -1 /var/lib/mysql | wc -l`" != "0" || mysql_install_db --basedir=/usr --datadir=/var/lib/mysql && chown -R mysql:mysql /var/lib/mysql'
ExecStartPre=install -d -o mysql -g root -m 0755 /var/log/mysql
ExecStart=/usr/bin/mysqld_safe --log-error=/var/log/mysql/mysqld.log
Restart=always
User=mysql
RuntimeDirectory=mysql
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target