通过brew安装
- 通过brew安装
- appstore安装Xcode
- /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
- 如果很慢,尝试如下方式
- curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install
- 修改brew_install,BREW_REPO = “https://github.com/Homebrew/brew".freeze改为BREW_REPO = “https://mirrors.ustc.edu.cn/brew.git".freeze
- ruby brew_install
- 此时脚本会停在 :Tapping homebrew/core Cloning into
- git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core —depth=1
- cd $(brew —repo)
- git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
- cd “$(brew —repo)/Library/Taps/homebrew/homebrew-core”
- git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
- brew update
- brew install mysql
忘记root密码
https://www.jianshu.com/p/6a70affeb5b1