Mac 安装 MySQL

在 Mac 下用 Homebrew 安装 MySQL, 网上的教程倒是很多,不过大多数都很默契地雷同。如果稍有点定制要求,就无从下手了。

我先也不免俗,从基本的开始:

一、首先安装 Homebrew

1
2
3
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
$ brew install git
$ brew update

二、安装 MySQL

用下面的命令就可以自动安装了:

1
$ brew install mysql

安装完成之后会有这样的提示:

➜  ~  brew install mysql
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.6.25.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mysql-5.6.25.yosemite.bottle.tar.gz
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly. To connect:
mysql -uroot To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
mysql.server start
==> Summary
上一篇:loadrunner用javavuser进行接口测试


下一篇:MD5和Base64介绍与应用