After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606668 - Fix mysql logging
Fix mysql logging
Status: RESOLVED OBSOLETE
Product: sysadmin
Classification: Infrastructure
Component: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Sysadmins
GNOME Sysadmins
Depends on:
Blocks:
 
 
Reported: 2010-01-11 20:06 UTC by Owen Taylor
Modified: 2013-11-21 14:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2010-01-11 20:06:57 UTC
Two problems, both will require fixing in the mysql puppet module:

 1) We don't have log rotation on for mysql - this isn't a big deal
    because we log almost nothing, but we should be rotating all log
    files - unrotated log files are asking for problems.

 2) The slow query logging isn't working - from mysqld.log

 /usr/libexec/mysqld: File '/var/log/mysqld-slow.log' not found (Errcode: 13)
 [ERROR] Could not use /var/log/mysqld-slow.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.

I think it's a permissions problem - mysql can't create a file on /var/log - so the puppet config needs to pre-create this file as mysql:mysql, and the logrotate confiugration needs to leave a file there. Not sure quite the magic in puppet to touch a file if it doesn't exist, but presumably it's a fairly common need.

Could also move the mysql logging to a mysql-owned subdir of /var/log to make things simpler.
Comment 1 Christer Edwards 2010-12-28 18:52:20 UTC
drawable: I seem to have fixed the issue re: mysqld-slow.log. I simply created the file manually and chown'd it to mysql:mysql. I no longer see that error in the log and the file has been in place for about a week.

progress: I don't get the same error on this host (re: -slow.log), so this may not be an issue (or perhaps it isn't configured to log slow queries). This has current logs as well as rotated logs, one per day for the last 7 days. This also has a /var/log/mysql/ with old (2008) log files. I vote these are safe to delete.

socket: This host matches progress in its logging status. It has rotated logs daily for the last week, it has the archive folder of /mysql/ and no -slow.log file. Perhaps these two just need to be configured for slow logging.

Any thoughts on standardizing between the three? One is RH and two are Ubuntu.
Comment 2 Andrea Veri 2013-11-21 14:56:51 UTC
The GNOME Infrastructure Team is currently migrating its bug / issue tracker away from Bugzilla to Request Tracker and therefore all the currently open bugs have been closed and marked as OBSOLETE.

The following move will also act as a cleanup for very old and ancient tickets that were still living on Bugzilla. If your issue still hasn't been fixed as of today please report it again on the relevant RT queue.

More details about the available queues you can report the bug against can be found at https://wiki.gnome.org/Sysadmin/RequestTracker.

Thanks for your patience,

the GNOME Infrastructure Team