File: //usr/lib/systemd/system/mysqld.service
# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance.
[Unit]
Description=MariaDB 10.5 database server
After=network.target
[Service]
LimitNOFILE=200000
Type=notify
User=mysql
Group=mysql
ExecStartPre=/usr/libexec/mysql-check-socket
ExecStartPre=/usr/libexec/mysql-prepare-db-dir %n
ExecStart=/usr/libexec/mysqld --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
ExecStartPost=/usr/libexec/mysql-check-upgrade
PrivateNetwork=false
KillMode=process
KillSignal=SIGTERM
# Don't want to see an automated SIGKILL ever
SendSIGKILL=no
Restart=on-abort
RestartSec=5s
UMask=007
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=300
# Place temp files in a secure directory, not /tmp
PrivateTmp=true
LimitMEMLOCK=infinity
[Install]
WantedBy=multi-user.target
Alias=mysql.service
Alias=mysqld.service