From e68a21750a6e17015341329e50f12726177358d0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 13 Feb 2013 10:10:07 +0100 Subject: mysql 5.6, first work --- mysql-logrotate.patch | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 mysql-logrotate.patch (limited to 'mysql-logrotate.patch') diff --git a/mysql-logrotate.patch b/mysql-logrotate.patch new file mode 100644 index 0000000..f76237d --- /dev/null +++ b/mysql-logrotate.patch @@ -0,0 +1,66 @@ +Adjust the mysql-log-rotate script in several ways: + +* Use the correct log file pathname for Red Hat installations. +* Enable creation of the log file by logrotate (needed since + /var/log/ isn't writable by mysql user); and set the same 640 + permissions we normally use. +* Comment out the actual rotation commands, so that user must edit + the file to enable rotation. This is unfortunate, but the fact + that the script will probably fail without manual configuration + (to set a root password) means that we can't really have it turned + on by default. Fortunately, in most configurations the log file + is low-volume and so rotation is not critical functionality. + +See discussions at RH bugs 799735, 547007 + + +diff -Naur mysql-5.5.22.orig/support-files/mysql-log-rotate.sh mysql-5.5.22/support-files/mysql-log-rotate.sh +--- mysql-5.5.22.orig/support-files/mysql-log-rotate.sh 2012-03-02 14:44:46.000000000 -0500 ++++ mysql-5.5.22/support-files/mysql-log-rotate.sh 2012-03-23 22:33:29.092043705 -0400 +@@ -3,7 +3,7 @@ + # in the [safe_mysqld] section as follows: + # + # [safe_mysqld] +-# err-log=@localstatedir@/mysqld.log ++# 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 +@@ -18,19 +18,21 @@ + # ATTENTION: This /root/.my.cnf should be readable ONLY + # for root ! + +-@localstatedir@/mysqld.log { +- # create 600 mysql mysql +- notifempty +- daily +- rotate 3 +- missingok +- compress +- postrotate +- # just if mysqld is really running +- if test -x @bindir@/mysqladmin && \ +- @bindir@/mysqladmin ping &>/dev/null +- then +- @bindir@/mysqladmin flush-logs +- fi +- endscript +-} ++# 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 @bindir@/mysqladmin && \ ++# @bindir@/mysqladmin ping &>/dev/null ++# then ++# @bindir@/mysqladmin flush-logs ++# fi ++# endscript ++#} -- cgit