ubuntu-buildroot/package/mariadb/mysqld.service

15 lines
430 B
SYSTEMD
Raw Permalink Normal View History

2024-04-01 15:19:46 +00:00
[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'
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