The mysql logrotate file needs to be updated

Bug #1259722 reported by monty solomon
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Medium
Unassigned
5.5
Triaged
Medium
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

The logrotate file installed on CentOS / RHEL should be updated to match the one in your blog at

Rotating MySQL slow logs safely
http://www.mysqlperformanceblog.com/2013/04/18/rotating-mysql-slow-logs-safely/

Tags: pkg
Revision history for this message
monty solomon (monty+launchpad) wrote :

Server version: 5.5.34-32.0-log Percona Server (GPL), Release rel32.0, Revision 591

CentOS release 6.3 (Final)

Linux 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
monty solomon (monty+launchpad) wrote :

Some of the entries in the comments of the installed file are out-of-date.

# 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/lib/mysql/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 !

/var/lib/mysql/mysqld.log {
        # create 600 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
}

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

This request makes sense IMHO.

tags: added: pkg
Revision history for this message
monty solomon (monty+launchpad) wrote :

The logrotate file should be updated to rotate the error, general, and slow log files.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1454

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.