Search code examples
macos-catalinamacportslaunchdmysql-8.0

MySQL8 Server is Missing from `launchctl list`


I installed MySQL 8 from MacPorts on macOS 10.15 Catalina and started it up. I'm able to login using mysql command, and make changes to the databases.

But now I want to stop it and switch to the installation on my virtual machine. I've already setup NAT port forwarding in VirtualBox, but I'm not sure how I can stop MySQL server as I can't find it from the launchctl list listing.

The service is installed though, as a symbolic link in /Library/LaunchDaemons/org.macports.mysql8-server.plist pointing to the MacPorts directory tree.


Solution

  • TL;DR: Did you try sudo?

    You can unload the MySQL8-Server service using the port command from MacPorts like this: port unload mysql8-server. It requires root priviledge.

    Also, MySQL server is running in as its own user - _mysql, so listing it in launchctl list requires running the command with root priviledge as well.