1f8cff
Adjust the mysql-log-rotate script in several ways:
1f8cff
1f8cff
* Use the correct log file pathname for Red Hat installations.
1f8cff
* Enable creation of the log file by logrotate (needed since
1f8cff
  /var/log/ isn't writable by mysql user); and set the same 640
1f8cff
  permissions we normally use.
1f8cff
* Comment out the actual rotation commands, so that user must edit
1f8cff
  the file to enable rotation.  This is unfortunate, but the fact
1f8cff
  that the script will probably fail without manual configuration
1f8cff
  (to set a root password) means that we can't really have it turned
1f8cff
  on by default.  Fortunately, in most configurations the log file
1f8cff
  is low-volume and so rotation is not critical functionality.
1f8cff
1f8cff
See discussions at RH bugs 799735, 547007
1f8cff
1f8cff
1f8cff
diff -up mariadb-5.5.32/support-files/mysql-log-rotate.sh.errlog mariadb-5.5.32/support-files/mysql-log-rotate.sh
1f8cff
--- mariadb-5.5.32/support-files/mysql-log-rotate.sh.errlog	2013-08-29 14:35:34.839119044 +0200
1f8cff
+++ mariadb-5.5.32/support-files/mysql-log-rotate.sh	2013-08-29 14:38:54.203996083 +0200
1f8cff
@@ -1,9 +1,9 @@
1f8cff
 # This logname can be set in /etc/my.cnf
1f8cff
-# by setting the variable "err-log"
1f8cff
-# in the [safe_mysqld] section as follows:
1f8cff
+# by setting the variable "log-error"
1f8cff
+# in the [mysqld_safe] section as follows:
1f8cff
 #
1f8cff
-# [safe_mysqld]
1f8cff
-# err-log=@localstatedir@/mysqld.log
1f8cff
+# [mysqld_safe]
1f8cff
+# log-error=/var/log/mariadb/mariadb.log
1f8cff
 #
1f8cff
 # If the root user has a password you have to create a
1f8cff
 # /root/.my.cnf configuration file with the following
1f8cff
@@ -18,19 +18,21 @@
1f8cff
 # ATTENTION: This /root/.my.cnf should be readable ONLY
1f8cff
 # for root !
1f8cff
 
1f8cff
-@localstatedir@/mysqld.log {
1f8cff
-        # create 600 mysql mysql
1f8cff
-        notifempty
1f8cff
-	daily
1f8cff
-        rotate 3
1f8cff
-        missingok
1f8cff
-        compress
1f8cff
-    postrotate
1f8cff
-	# just if mysqld is really running
1f8cff
-	if test -x @bindir@/mysqladmin && \
1f8cff
-	   @bindir@/mysqladmin ping &>/dev/null
1f8cff
-	then
1f8cff
-	   @bindir@/mysqladmin flush-logs
1f8cff
-	fi
1f8cff
-    endscript
1f8cff
-}
1f8cff
+# Then, un-comment the following lines to enable rotation of mysql's log file:
1f8cff
+
1f8cff
+#/var/log/mariadb/mariadb.log {
1f8cff
+#        create 640 mysql mysql
1f8cff
+#        notifempty
1f8cff
+#	daily
1f8cff
+#        rotate 3
1f8cff
+#        missingok
1f8cff
+#        compress
1f8cff
+#    postrotate
1f8cff
+#	# just if mysqld is really running
1f8cff
+#	if test -x @bindir@/mysqladmin && \
1f8cff
+#	   @bindir@/mysqladmin ping &>/dev/null
1f8cff
+#	then
1f8cff
+#	   @bindir@/mysqladmin flush-logs
1f8cff
+#	fi
1f8cff
+#    endscript
1f8cff
+#}