brew安装MySQL V5.7



安装

brew install mysql@5.7                // 安装
brew link --force mysql@5.7      // 链接
brew services start 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

选low即可,输入8位,我这里使用12345678 ,其他一路y确认即可。

启动

➜  ~ brew services start mysql@5.7
==> Successfully started `mysql@5.7` (label: homebrew.mxcl.mysql@5.7)

账号:root 密码:12345678


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM