Not logging to syslog even though configured to by default

Bug #1134081 reported by Roman Yepishev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.5 (Ubuntu)
New
Undecided
Unassigned

Bug Description

STR:

1. Install mysql-server.
2. start mysql
3. Look into /var/log/syslog

Expected results:
Feb 27 08:13:49 sabre mysqld: 130227 8:13:49 [Note] /usr/sbin/mysqld: ready for connections.
Feb 27 08:13:49 sabre mysqld: Version: '5.5.29-0ubuntu0.12.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)

Actual results:
Only lines from debian-start are visible.

The reason for that is that upstart job calls /usr/sbin/mysqld and not /usr/bin/mysqld_safe which sets up various bits and pieces including the logger process. So no logs are sent to syslog from mysql on Ubuntu 12.04 where MySQL is configured to log to syslog via /etc/mysql/conf.d/mysqld_safe_syslog.cnf by default.

In my case it prevents configuration of X509 client certificate checks because "X509 issuer mismatch: should be 'C=IL, O=StartCom Ltd., OU=Secure Digital Certificate Signing, CN=StartCom Class 1 Primary Intermediate Server CA' but is '/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Class 1 Primary Intermediate Server CA'" message is never seen in the logs and this is important because of http://bugs.mysql.com/bug.php?id=59376 where RDN should be in specific order.

WORKAROUND:
Create /etc/init/mysql.override with the following contents:

exec /usr/bin/mysqld_safe

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: mysql-server 5.5.29-0ubuntu0.12.04.1
ProcVersionSignature: Ubuntu 3.2.0-38.60-generic-pae 3.2.37
Uname: Linux 3.2.0-38-generic-pae i686
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: i386
Date: Wed Feb 27 08:14:52 2013
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release i386 (20120424.1)
Logs.var.log.daemon.log:

Logs.var.log.kern.log:
 Feb 27 06:58:38 sabre-clone kernel: [76625.775253] type=1400 audit(1361948318.496:20): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=6597 comm="apparmor_parser"
 Feb 27 06:59:41 sabre-clone kernel: [76688.595429] type=1400 audit(1361948381.316:21): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=6799 comm="apparmor_parser"
 Feb 27 07:13:38 sabre-clone kernel: [77525.967644] type=1400 audit(1361949218.688:22): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=7130 comm="apparmor_parser"
MarkForUpload: True
MySQLConf.etc.mysql.conf.d.mysqld.safe.syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['mysql_upgrade_info', 'performance_schema', 'debian-5.5.flag', 'test', 'ib_logfile0', 'ib_logfile1', 'mysql', 'ibdata1', 'rtginua6_wp1']
PackageArchitecture: all
SourcePackage: mysql-5.5
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Roman Yepishev (rye) wrote :
Roman Yepishev (rye)
description: updated
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

This sounds simliar to bug 1014732. Please could you take a look and see what you think? The fix for that bug is currently in precise-proposed and on its way to precise-updates. It won't log to syslog, but will log to /var/log/mysql/error.log.

Once that bug is fixed, what do you think about the status of and your proposed fix to this bug?

Revision history for this message
Roman Yepishev (rye) wrote :

@Robie, perfect! Installed the package from -proposed and the logs went to /var/log/mysql/error.log as expected without mysqld_safe wrapper.

Revision history for this message
Robie Basak (racb) wrote :

Thanks Roman. I guess it's OK to mark this bug as a duplicate of bug 1014732 then?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.