Public bug reported:

The current logrotate config for mysql server 5.5 fails, therefore logs
are not rotated:

root@lxc:/etc# dpkg -l | grep mysql-server
ii  mysql-server                        5.5.47-0ubuntu0.14.04.1          all    
      MySQL database server (metapackage depending on the latest version)
ii  mysql-server-5.5                    5.5.47-0ubuntu0.14.04.1          amd64  
      MySQL database server binaries and system database setup
ii  mysql-server-core-5.5               5.5.47-0ubuntu0.14.04.1          amd64  
      MySQL database server binaries

root@lxc:~# logrotate -f /etc/logrotate.d/mysql-server 
error: skipping "/var/log/mysql.log" because parent directory has insecure 
permissions (It's world writable or writable by group which is not "root") Set 
"su" directive in config file to tell logrotate which user/group should be used 
for rotation.

In order to set up logrotate again, I added (cf. diff attached):
- su root syslog
- notifempty

I added the "notifempty" because in default Ubuntu mysql installations 
"/var/log/mysql.log" is not used:
root@lxc:/etc# find /etc/mysql/ -type f -print0 | xargs -0 grep -i 
'/var/log/mysql.log'
root@lxc:/etc# echo $?
123

** Affects: mysql-5.5 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: logrotate mysql-server

** Patch added: "Patch for logrotate mysql-server config"
   
https://bugs.launchpad.net/bugs/1558471/+attachment/4601932/+files/logrotate-mysql-server.diff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1558471

Title:
  logrotate config mysql-server fails with error "error: skipping
  "/var/log/mysql.log"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/1558471/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to