Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 596507 - query-log option
Summary: query-log option
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tom Lane
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-26 20:31 UTC by Nathanael Noblet
Modified: 2013-07-03 03:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-06-28 15:27:49 UTC

Attachments (Terms of Use)

Description Nathanael Noblet 2010-05-26 20:31:48 UTC
Description of problem:
Sometimes I want to turn on mysql's query logging capability. To do this I need to edit the initscript, since for some reason adding the option to my.cnf takes no effect. It would be nice if /etc/init.d/mysqld could read from /etc/sysconfig/mysqld for that option. That way turning it on/off would be easier than editing the initscript

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. N/A
Actual results:

Expected results:

Additional info:

Comment 1 Tom Lane 2010-05-26 20:58:00 UTC
Works for me.  Please show exactly what you did to /etc/my.cnf that didn't work.

Comment 2 Nathanael Noblet 2010-05-28 16:48:05 UTC
I've tried adding added


under the [mysqld] as well as [mysqld_safe] sections. Under mysqld mysql fails to start as it doesn't understand teh query-log option

100528 10:43:15 [ERROR] /usr/libexec/mysqld: unknown variable 'query-log=/var/log/mysql-query.log'
100528 10:43:15 [ERROR] Aborting

The other just seems to be ignored. However if I edit the initscript for mysqld and add --query-log=/var/log/mysql-query.log and restart it works.

Comment 3 Tom Lane 2010-05-28 17:49:48 UTC
AFAIK the correct spelling of that option is --slow-query-log, or slow_query_log as a variable.  I can't find anything in either the manual or the source code suggesting that query-log by itself should be accepted.  Please see

Comment 4 Tom Lane 2010-06-28 15:27:49 UTC
Closing, since AFAICS this is just pilot error and not a bug.

Note You need to log in before you can comment on or make changes to this bug.