mac开发环境搭建篇(2)--brew与mysql

【brew】:参考 https://www.cnblogs.com/zoulifeng2017/p/7514139.html

终端执行:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

brew install {应用名,如git} 安装软件


【mysql】

参考 https://blog.csdn.net/cheng649090216/article/details/79246333

       https://www.jianshu.com/p/4cb5ef29a099      

安装 brew install mysql

启动 mysql.server start

关闭 mysql.server stop

配置自启动:

$ mkdir -p ~/Library/LaunchAgents
$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents //只执行到这一句。自启动没什么必要,需要时手动启动mysql即可。
$ find /usr/local/Cellar/mysql/ -name "homebrew.mxcl.mysql.plist" -exec cp {} ~/Library/LaunchAgents/ \;
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

猜你喜欢

转载自www.cnblogs.com/mzrs/p/9326629.html