From cc426cff465c5e67cc7ae21af2ca6924ed59db20 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 11 Feb 2017 11:48:04 +0100 Subject: compat-mysql51: 5.1.73 --- 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..a9e3862 --- /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.0.95.orig/support-files/mysql-log-rotate.sh mysql-5.0.95/support-files/mysql-log-rotate.sh +--- mysql-5.0.95.orig/support-files/mysql-log-rotate.sh 2011-12-16 07:12:45.000000000 -0500 ++++ mysql-5.0.95/support-files/mysql-log-rotate.sh 2012-06-02 12:28:03.038568380 -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