[Unit] Description=MariaDB database server (with tcmalloc) After=network.target After=syslog.target [Install] WantedBy=multi-user.target Alias=mysql.service Alias=mysqld.service [Service] Type=notify PrivateNetwork=false User=mysql Group=mysql CapabilityBoundingSet=CAP_IPC_LOCK ProtectSystem=full PrivateDevices=true ProtectHome=true PermissionsStartOnly=true ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION" ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \ VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \ && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1" ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION" KillMode=process KillSignal=SIGTERM SendSIGKILL=no Restart=on-abort RestartSec=5s UMask=007 OOMScoreAdjust=-600 PrivateTmp=false LimitNOFILE=16364 Environment="LD_LIBRARY_PATH=/usr/local/lib" Environment="LD_PRELOAD=/usr/lib64/libtcmalloc.so" Environment="HEAPPROFILE=/tmp/mysqld.prof"