1

I have MySQL installed on Mac OS X 10.6 (Snow Leopard). The problem is that I cant stop the server. Its running all the time.

How can I solve that? I tried to install MySQL again, but this didn’t solve the problem. How about deinstalling the server? I read that I should turn the server of before deinstalling it, but that is exactly what I can’t do…

Hints?

5
  • 1
    How does it start? This will show what user it is running as and what mechanism starts it
    – mmmmmm
    Dec 14, 2010 at 15:45
  • If you need root to do some actions, you will get ask for the root password. Mac handles this by itself...
    – Markus
    Dec 14, 2010 at 15:45
  • you need to tell us how it starts, which is easier to know if you can tell us how it was installed in the first place. Was it MacPorts, a stand-alone package, or something else?
    – user3463
    Dec 14, 2010 at 17:37
  • 1
    stackoverflow.com/questions/11091414/how-to-stop-mysqld This answer from the link above solved my problem. Oct 25, 2016 at 2:59
  • Voting to close because this question os 12+ years old at this point and the original poster is not clear as to how it was initially installed. If it was installed via the official Mac OS X Oracle package installer, there is a system preferences control panel that allows one to stop and disable it from coming up on reboot. Otherwise, there are multiple ways to deal with this and this thread will grow out of control. In general, without the specific knowledge of how it was installed this question can’t cleanly be answered. May 11, 2021 at 18:00

2 Answers 2

3

Did you try $ sudo mysqladmin shutdown?

If it's restarting itself, it might have a launchd job. You can use $ launchctl list to see every job on the system, perhaps $ launchctl list|grep mysql to see if this is the problem, and then find the file for the launchd job in one of the launchd plist directories, in this case, probably /Library/LaunchDaemons/.

2
  • I'd upgraded from an old install that I can't remember the details of to a new 64-bit version using the DMG installer -- in my case this had left a launchd job lying around from the previous version that was interfering with the new version (which instead of using com.mysql.mysqld seems to use something more dynamic that shows up like 0x7fad52420fe0.anonymous.mysqld in launchctl list.) Nuking the old launchd job fixed the problem, thanks for the pointer in the right direction. Mar 2, 2014 at 16:16
  • BTW, I had to run sudo launchctl list | grep mysql in order to see it in the launchctl list
    – Nick B
    Sep 3, 2015 at 19:49
0

If installed with homebrew it will automatically restart.

brew service name list

brew services list output

Stop the service:

brew services stop [email protected] 

Original Answer: https://stackoverflow.com/a/57169447/2670370

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .