/etc/logrotate.d/mysqld - CentOS Linux 6

This is the default example configuration of mysqld provided by MySQL. This config file was generated by MySQL running on CentOS 6.

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

    # This logname can be set in /etc/my.cnf
# by setting the variable "err-log"
# in the [safe_mysqld] section as follows:
#
# [safe_mysqld]
# err-log=/var/log/mysqld.log
#
# If the root user has a password you have to create a
# /root/.my.cnf configuration file with the following
# content:
#
# [mysqladmin]
# password = <secret> 
# user= root
#
# where "<secret>" is the password. 
#
# ATTENTION: This /root/.my.cnf should be readable ONLY
# for root !

# Then, un-comment the following lines to enable rotation of mysql's log file:

#/var/log/mysqld.log {
#        create 640 mysql mysql
#        notifempty
#	daily
#        rotate 3
#        missingok
#        compress
#    postrotate
#	# just if mysqld is really running
#	if test -x /usr/bin/mysqladmin && \
#	   /usr/bin/mysqladmin ping &>/dev/null
#	then
#	   /usr/bin/mysqladmin flush-logs
#	fi
#    endscript
#}

    
  

Config Details

Location
/etc/logrotate.d/mysqld
Operating system
CentOS Linux 6
Length
38 lines
MD5 checksum
097ca7adadd06bc2f7174265ddcdd6c9

Usage

Download the raw file with wget or curl

Wget

wget -O mysqld.example http://exampleconfig.com/static/raw/mysql/centos6/etc/logrotate.d/mysqld

cURL

curl http://exampleconfig.com/static/raw/mysql/centos6/etc/logrotate.d/mysqld > mysqld.example