Ask Different is a question and answer site for power users of Apple hardware and software. 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'm trying to reset my root password on a macports installed MySQL on OS X. But none of the ways to do this that I can find works, for various reasons. One reason common to all is that I can't stop the mysql deamon.

As I understand it, I should be able to stop it with

sudo launchctl stop org.macports.mysql5

Which makes absolutely no difference. No error message, nothing. Is launchd really this sucky, or do I misuse it? Reasonably it should give me an error when it fails, but nope, nothing.

Trying to kill the processes with kill -9 just makes them restart again, so that doesn't work either.

I also tried

sudo launchctl unload org.macports.mysql5

But that gives me this error:

launchctl: Couldn't stat("org.macports.mysql5"): No such file or directory

(And I must confess I don't understand what "Unload configuration files and/or directories" means, which is what the Unload command apparently does according to the little docs I can find).

So, what now?

share|improve this question
up vote 5 down vote accepted

The correct answer is

sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist

And you start it with

sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist

Thanks to kh13org for the pointer.

share|improve this answer
The file name may be slightly different. For example, on my system, the name is /Library/LaunchDaemons/org.macports.mysql55-server.plist. – Bill Lipa Dec 29 '14 at 18:27

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.