Mac Homebrew 安裝Mysql 設置自啓動

建立mysql用戶主目錄

$ mkdir -p ~/Library/LaunchAgents

建立軟鏈接

$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents

plist 文件存儲用戶設置 複製到用戶主目錄

$ find /usr/local/Cellar/mysql/ -name "homebrew.mxcl.mysql.plist" -exec cp {} ~/Library/LaunchAgents/ \;

設置mysql自啓動

$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
相關文章
相關標籤/搜索