brew services: where to edit configuration?

  1. Copy /Users/mh/Library/LaunchAgents/homebrew.mxcl.mysql56.plist somewhere
  2. make changes to copy of plist
  3. run brew services start mysql56 {path to modified copy of plist file}

Update 2022 - for newer versions:

  1. run brew services start mysql56 --file=path to modified copy of plist file

All .plist files that come with Formulas can be found in Cellar dir. For instance homebrew.mxcl.mysql.plist is in /usr/local/Cellar/mysql/5.7.14. You can modify it and  brew services will use it.

Alternatively you can modify /Library/LaunchDaemons/homebrew.mxcl.mysql.plist and make it immutable with sudo chflags uchg /Library/LaunchDaemons/homebrew.mxcl.mysql.plist. This won't allow brew to rewrite or modify .plist file.


I (unfortunately) don't know which file you can edit, but I can confirm that editing anything in the Library/LaunchAgents directory will be overwritten by brew services on the next start, so editing it directly isn't going to help.