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

  • 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 'SO- stop being evil' 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

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

# Additional options

# Set locale

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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