Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I know the commands to restart/stop/start, but when I try to pass options it doesn't seem to work!

CENTOS 6, MySQL 5.14

service mysql restart
service httpd restart

Then I tried this:

/etc/init.d/mysql --general_log /my/log/path.log

That doesn't work either (the error message says it doesn't have access) =/

Update: Apparently I can't run mysqld as root because of security issues

share|improve this question
    
Doesn't work meaning what? Do you get errors? If not, how do you know it doesn't work? Does anything appear in the logs (files under /var/log)? What user are you running these commands as? What OS are you running? –  Gilles Feb 8 '12 at 23:33
    
running as root on CentOS 6 / Yum RPM mysql.1.42-community –  qodeninja Feb 8 '12 at 23:44

1 Answer 1

up vote 4 down vote accepted

To change options permanently and in the sanctioned manner, edit the files in /etc/sysconfig that have the same name as the service.

For example, consider httpd. On one system I have, there are several things you can set:

# Processing model
HTTPD=/usr/sbin/httpd.worker

# Additional options
OPTIONS=

# Set locale
HTTPD_LANG=C

(The actual file is much more verbose and explanatory than this.)

There should be files in /etc/sysconfig for virtually every service.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.