1、安装brew包管理器
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
2、brew install mysql
过程中会遇到MAC系统root用户无法使用brew命令
使用brew安装程序提示如下错误
Error: Running Homebrew as root is extremely dangerous and no longer
supported.As Homebrew does not drop privileges on installation you would be
giving allbuild scripts full access to your system.
如何解决呢?这是因为新的MAC系统不允许在root用户下使用brew命令安装软件了。首先切换到普通用户
将/usr/local的属组改为当前用户
此时在用brew install mysql 就成功了~