Red Hat Bugzilla – Bug 596507
Last modified: 2013-07-02 23:28:59 EDT
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):
Steps to Reproduce:
Works for me. Please show exactly what you did to /etc/my.cnf that didn't work.
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.
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
Closing, since AFAICS this is just pilot error and not a bug.