Logrotate script for percona 5.7 on ubuntu 16.04


After some weeks my /var/log/mysqld.log is huge (430Mb).

I was looking for the logrotate and i found this one :


But it can’t work :


It’s look like some package / script are not tested on Ubuntu ?

Best regards


First, let’s fix the bug in the Percona log rotate script:

sed -i 's#/var/log/mysql.log#/var/log/mysqld.log#' /etc/logrotate.d/percona-xtradb-cluster-server-5.7

From your screenshots, I can see you don’t have /etc/mysql/debian.cnf file, so either you don’t have the debian-sys-maint user in your database (then you should create one) or it is there but the file is only installed on the bootstrap node, if so do copy this file to all the cluster nodes.