/etc/logrotate.d/mariadb - CentOS Linux 8

This is the default example configuration of mariadb provided by MariaDB. This config file was generated by MariaDB running on CentOS 8.

It is located under: /etc/logrotate.d/mariadb

    # This logname can be set in /etc/my.cnf
# by setting the variable "log-error"
# in the [mysqld] section as follows:
#
# [mysqld]
# log-error=/var/log/mariadb/mariadb.log

/var/log/mariadb/mariadb.log {
        create 600 mysql mysql
        notifempty
        daily
        rotate 3
        missingok
        compress
    postrotate
	# just if mysqld is really running
        if [ -e /run/mariadb/mariadb.pid ]
        then
           kill -1 $(</run/mariadb/mariadb.pid)
        fi
    endscript
}

    
  

Config Details

Location
/etc/logrotate.d/mariadb
Operating system
CentOS Linux 8
Length
22 lines
MD5 checksum
fef0a55b0cb5995764dc5acf7b2b1960

Usage

Download the raw file with wget or curl

Wget

wget -O mariadb.example http://exampleconfig.com/static/raw/mariadb/centos8/etc/logrotate.d/mariadb

cURL

curl http://exampleconfig.com/static/raw/mariadb/centos8/etc/logrotate.d/mariadb > mariadb.example