homebrew.mxcl.mysql.plist launchctl load error

homebrew, macos, mysql

Solution

The user running the command must be logged in via the GUI. Then, the command will work over both SSH and with a local terminal on the machine.

Problem

I brew installed mysql and want to launchd start mysql at login. ``` brew install mysql ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist ``` The brew install was successful, but after the last command, it shows ``` Could not find domain for ``` How to resolve this issue? System info: Mac OS X 10.10 Yosemite, brew installed `mysql-5.6.21`. On my other machine (same OS, newer and less used), the above three commends were successful and mysql indeed automatically start after restarting the machine.

Original source