/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mariadb-slow.log /var/log/mysql_error.log {
       daily
       rotate 7
       missingok
       create 640 mysql adm
       compress
       sharedscripts
       postrotate
         test -x /usr/bin/mysqladmin || exit 0

          if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
             If this fails, check debian.conf!
            mysqladmin --defaults-file=/etc/mysql/debian.cnf flush-logs
          fi
       endscript
}