Logration does not work

Hi,

MariaDB run on RedHat 9. I have configured the log rotation but that does not work. The error log file grow each day without made rotation.

[root@svx-mdb-04t 10.11]# ls -hl svx-mdb-04t.log -rw-rw----. 1 mysql mysql 1.2G Jul 22 07:27 svx-mdb-04t.log [root@svx-mdb-04t 10.11]#

[root@svx-mdb-04t 10.11]# cat /etc/logrotate.d/mariadb

  1. This is the MariaDB configuration for the logrotate utility
  2. Note that on most Linux systems logs are written to journald, which has its
  3. own rotation scheme.
  4. Read https://mariadb.com/kb/en/error-log/ to learn more about logging and
  5. https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/ about rotating logs.

/database/logs/10.11/*.log {

su mysql mysql

missingok

notifempty

daily

rotate 30

maxsize 500M

minsize 50M

compress

delaycompress

sharedscripts

postrotate

  1. just if mysqld is really running if test -x /usr/bin/mariadb-admin && \ /usr/bin/mysqladmin ping &>/dev/null then /usr/bin/mariadb-admin --local flush-error-log \ flush-engine-log flush-general-log flush-slow-log fi endscript }

Regards and thanks for your help. Olivier

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.