0.下载软件包管理工具homebrew
Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能
Homebrew网站链接
命令行输入homebrew安装命令
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安装完成后,在命令行进行验证
$ brew --version
Homebrew 2.0.3
Homebrew/homebrew-core (git revision 4d5e6; last commit 2019-03-06)
Homebrew/homebrew-cask (git revision c2065; last commit 2019-03-07)
这就表示homebrew安装完毕
1.homebrew安装mysql
$ brew install mysql
等待下载安装结束就可以了,
2.启动mysql服务,并修改密码
待上述安装完成之后。命令行启动mysql服务,输入
$ mysql.server start
Starting MySQL
SUCCE