SHA256
1
0
forked from pool/mariadb

Accepting request 676156 from home:tbechtold:branches:server:database

- add slow_query_log example to my.cnf and adjust the logrotate
  configuration to rotate all /var/log/mysql/*.log files .
  This is useful when the slow query log is enabled. In that case,
  this log file should also be rotated (bsc#1112767)

OBS-URL: https://build.opensuse.org/request/show/676156
OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=225
This commit is contained in:
Kristyna Streitova 2019-02-15 11:05:43 +00:00 committed by Git OBS Bridge
parent 5f0bcf7957
commit a40180b467
4 changed files with 14 additions and 2 deletions

View File

@ -9,7 +9,7 @@ Index: support-files/mysql-log-rotate.sh
+++ support-files/mysql-log-rotate.sh
@@ -20,6 +20,7 @@
/var/log/mysql/mysqld.log {
/var/log/mysql/*.log {
# create 600 mysql mysql
+ su mysql mysql
notifempty

View File

@ -14,7 +14,7 @@ Index: support-files/mysql-log-rotate.sh
# for root !
-@localstatedir@/mysqld.log {
+/var/log/mysql/mysqld.log {
+/var/log/mysql/*.log {
# create 600 mysql mysql
notifempty
daily

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Feb 14 15:01:27 UTC 2019 - Thomas Bechtold <tbechtold@suse.com>
- add slow_query_log example to my.cnf and adjust the logrotate
configuration to rotate all /var/log/mysql/*.log files .
This is useful when the slow query log is enabled. In that case,
this log file should also be rotated (bsc#1112767)
-------------------------------------------------------------------
Tue Feb 12 13:48:59 UTC 2019 - Nicolas Bock <nicolas.bock@suse.com>

4
my.ini
View File

@ -63,6 +63,10 @@ server-id = 1
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
# Enable the slow query log to see queries with especially long duration
# slow_query_log=1
# slow_query_log_file = /var/log/mysql/mysqld_slow.log
[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin