Package: mysql-server Version: 4.0.24-10sarge1 Severity: important
The logrotate script distributed with mysql-server, /etc/logrotate.d/mysql-server, explicitly changes the ownership and mode of the mysql error logs to root:adm and 640, respectively. This is done after the logs are flushed, so mysqld has a handle on it before the change is done. However, if you try to flush logs after that, it fails with the following error: ERROR 1105: Unknown error or if you try to run mysqldump with the --flush-logs option, you get mysqldump: Got error: 1105: Unknown error when doing refresh Most people are probably not seeing this because the default Debian configuration is to not use the error log file (/etc/mysql/my.cnf states that error logs go to syslog). However, if you enable error logging to its own file by placing the following line in /etc/mysql/my.cnf: log-error = /var/log/mysql.err and change the ownership and permissions of the .err file as logrotate does, you should be able to reproduce the error. I have worked around this by removing the offending lines in the logrotate script. Here is the patch. --- mysql-server.dpkg-dist 2005-11-17 11:40:18.846428375 -0600 +++ mysql-server 2005-11-17 09:30:48.117282881 -0600 @@ -25,10 +25,5 @@ else $MYADMIN flush-logs fi - errlogs=`ls /var/log/mysql.err* /var/log/mysql/mysql.err* 2>/dev/null` - if [ -n "$errlogs" ]; then - chown root:adm $errlogs - chmod 640 $errlogs - fi endscript } -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.10 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages mysql-server depends on: ii adduser 3.63 Add and remove users and groups ii debconf 1.4.30.13 Debian configuration management sy ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libdbi-perl 1.46-6 Perl5 database interface by Tim Bu ii libgcc1 1:3.4.3-13 GCC support library ii libmysqlclient12 4.0.24-10sarge1 mysql database client library ii libstdc++5 1:3.3.5-13 The GNU Standard C++ Library v3 ii libwrap0 7.6.dbs-8 Wietse Venema's TCP wrappers libra ii mailx 1:8.1.2-0.20040524cvs-4 A simple mail user agent ii mysql-client 4.0.24-10sarge1 mysql database client binaries ii mysql-common 4.0.24-10sarge1 mysql database common files (e.g. ii passwd 1:4.0.3-31sarge5 change and administer password and ii perl 5.8.4-8 Larry Wall's Practical Extraction ii psmisc 21.5-1 Utilities that use the proc filesy ii zlib1g 1:1.2.2-4.sarge.2 compression library - runtime -- debconf information: * mysql-server/nis_warning: mysql-server/really_downgrade_from_41: false mysql-server/mysql_update_hints1: * mysql-server/start_on_boot: false mysql-server/postrm_remove_databases: false * mysql-server/mysql_install_db_notes: -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]