Get the default configuration file mariadb for MariaDB, optimized for CentOS Linux 8. This example configuration ensures optimal compatibility and performance for MariaDB, making it easy to set up and adjust to meet your needs.
Find and download the configuration file here: /etc/logrotate.d/mariadb.
For more configurations and setup guides, visit our related files section to further customize your system.
# 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
}
Download the raw file with wget or curl
wget -O mariadb.example https://exampleconfig.com/static/raw/mariadb/centos8/etc/logrotate.d/mariadb
curl https://exampleconfig.com/static/raw/mariadb/centos8/etc/logrotate.d/mariadb > mariadb.example
Other config files you might find useful