[debian-mysql] Bug#745071: mysql-server: MySQL not logging to syslog as intended

Demetris Demetriou mitsosgtir at gmail.com
Thu Apr 17 18:27:18 UTC 2014


Package: mysql-server
Severity: important

Hello,
MySQL on Debian Wheezy does not log to syslog as intended:

/etc/mysql/my.cnf Line 75:
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.

/etc/mysql/conf.d/mysqld_safe_syslog.conf contents
[mysqld_safe]
syslog

According to this, mysql should be logging to syslog, but no entries are being
registered. To correct this, I had to change the following:

/etc/init.d/mysql Lines 108-109:
            # Start MySQL!
            /usr/bin/mysqld_safe > /dev/null 2>&1 &

Change to:
            # Start MySQL!
            /usr/bin/mysqld_safe --syslog > /dev/null 2>&1 &


Issue a sudo service mysql restart and syslog entries start firing up, using
"mysqld:", "mysqld_safe:" and "/etc/mysql/debian-start[ProcessID]:" tags.

This is a serious bug since it completely disables the MySQL logging
facilities. Neither syslog, nor /var/log/mysql.log nor /var/log/mysql.err nor
any /var/log/mysql/* log contain anything related to MySQL. Checking backlogs
shows that this went on for a long long time, so I cannot be sure how long the
bug was left in the package. To make myself clear, ALL error logs are
completely empty (in the case of syslog, NO entries for mysql exist). Checking
a couple of servers shows that it is indeed across architectures as well, with
this behaviour showing up on x86_64 and ARM as well.

Thank you for your time.



-- System Information:
Debian Release: 7.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



More information about the pkg-mysql-maint mailing list