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

I am using launchd to start mysql on boot, it is working fine. I am able to stop and start the service using 'launchctl unload' and 'launchctl load' commands. Also I am able to start the service by typing 'mysqld_safe' command in terminal. But, if I stop the service through 'launchctl stop' and then start the service through 'mysqld_safe' command, I am unable to stop the service through 'launchctl stop'. Is this possible? What I am doing wrong here?

My Plist is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">


Command used to start mysql through terminal is:

mysqld_safe --defaults-file=/path/to/mysql/my.cnf --port=3306 --socket=/path/to/mysql/tmp/mysql.sock --datadir=/path/to/mysql/data --pid-file=/path/to/mysql/data/
share|improve this question
up vote 1 down vote accepted

This is intended behavior. Issuing launchctl stop for a job which has not been loaded does not work.

share|improve this answer
To expand on this: if it wasn't started by the launchd daemon, it's not a launchd job can't be managed with launchctl -- it's just an independent process that happens to be running the same program that your launchd job would run. – Gordon Davisson Sep 5 '13 at 16:46

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.