14 lines
327 B
SYSTEMD
14 lines
327 B
SYSTEMD
|
[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'
|
||
|
ExecStart=/usr/bin/mysqld_safe
|
||
|
Restart=always
|
||
|
User=mysql
|
||
|
RuntimeDirectory=mysql
|
||
|
RuntimeDirectoryMode=0755
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|