2016-12-16 23:26:52 +01:00
|
|
|
[Unit]
|
|
|
|
Description=MySQL database server
|
|
|
|
|
|
|
|
[Service]
|
2020-02-04 02:21:53 +01:00
|
|
|
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'
|
2020-02-04 02:21:58 +01:00
|
|
|
ExecStartPre=install -d -o mysql -g root -m 0755 /var/log/mysql
|
|
|
|
ExecStart=/usr/bin/mysqld_safe --log-error=/var/log/mysql/mysqld.log
|
2016-12-16 23:26:52 +01:00
|
|
|
Restart=always
|
|
|
|
User=mysql
|
|
|
|
RuntimeDirectory=mysql
|
|
|
|
RuntimeDirectoryMode=0755
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|