2b653736ce
By default, mariadb creates logging files under the data directory. This patch updates the startup scripts to log under /var/log/mysql. Signed-off-by: Ryan Coe <bluemrp9@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
15 lines
468 B
Desktop File
15 lines
468 B
Desktop File
[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
|