Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Getting my hands dirty with a MySql slave setup, I ran into a puzzling question: how do I pass any of the myriad options to mysqld (--skip-slave-start in this particular case) when I am restarting it and it is installed as an Upstart job?

I can think of many ways to hack it, but I feel I must be missing something obvious.


share|improve this question
up vote 1 down vote accepted

Consider specifying skip-slave-start in the cnf instead. Typically, flags are specified in the init script, which would be located in /etc/init.d.

share|improve this answer
I agree with Warner. Set the options in the config file. If you do want to pass options to mysqld in the init script the file you need is actually /etc/init/mysql.conf and the options get added to line 27 on a standard 10.04 install. You can start mysqld from the command line without using init at all but it is not a good solution for production use. – Richard Holloway Aug 5 '10 at 22:36
Right, both editing the cnf and starting it on the command line were in fact my "hack it" solutions. I probably should have been more specific - the option I want to pass to mysqld is not permanent, it's only a one-time option. Mysqld is already running, I just need to temporarily restart it with this option while I perform some administration (setup as a slave), after that I'd restart it again in production mode, i.e. without the option. Again it's not a blocker or anything, I'm just puzzled about the lack of this feature. – Jare Aug 6 '10 at 7:25
Why would you restart when you can just stop slave;? skip-slave-start is to prevent it upon startup. – Warner Aug 6 '10 at 13:09
Warner, that is correct. I was getting some errors after doing this via stop slave; and I thought they were caused by the threads having started then stopped, so I went off this tangent, but the same errors still happen. Thanks! – Jare Aug 9 '10 at 11:31

Your Answer


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.