Mark Harrison Mark Harrison - 4 months ago 53
MySQL Question

brew services: where to edit configuration?

Brew services has installed this plist file for mysql.

~ $ brew services list
Name Status User Plist
mysql56 started mh /Users/mh/Library/LaunchAgents/homebrew.mxcl.mysql56.plist


Is this file safe to edit (i.e. will brew ever overwrite changes made here)? Is there another method I should use to modify the file?

Answer

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.