安装MySQL
// 安装
brew install mysql@5.7
// 安装homebrew服务管理
brew tap homebrew/services
// 启动服务
brew services start mysql@5.7
// 查看是否启动
brew services list
// 链接
brew link --force mysql@5.7
//停止
brew services stop mysql@5.7
//重启
brew services restart mysql@5.7
设置密码
启动之后,输入一行命令
mysql_secure_installation
5.7.x对设置的密码有严格的要求,分为LOW、MEDIUM、STRONG三个等级,对应要求如下:
LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file
最新评论