Mac下安装brew、MysqL等软件
一、安装brew
官方的命令,报错443之类的,不用尝试了,直接用以下命令即可,因为一些原因,访问被拒绝,也不用上网找了 直接复制下面的命令 根据提示安装即可。国内镜像。速度很快
/bin/zsh -c "$(curl -fsSL /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
二、安装MysqL
需要指定版本的软件@版本号即可。
brew install MysqL@5.7
wang@localhost:$ brew install MysqL@5.7
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles/MysqL%405.7-5.7.29.catalina.bottle.tar
######################################################################## 100.0%
==> Pouring MysqL@5.7-5.7.29.catalina.bottle.tar.gz
==> /usr/local/Cellar/MysqL@5.7/5.7.29/bin/MysqLd --initialize-insecure --user=jinping --basedir=/usr/local/Cellar/m
==> Caveats
We've installed your MysqL database without a root password. To secure it run:
MysqL_secure_installation
MysqL is configured to only allow connections from localhost by default
To connect run:
MysqL -uroot
MysqL@5.7 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have MysqL@5.7 first in your PATH run:
echo 'export PATH="/usr/local/opt/MysqL@5.7/bin:$PATH"' >> /Users/jinping/.bash_profile
For compilers to find MysqL@5.7 you may need to set:
export LDFLAGS="-L/usr/local/opt/MysqL@5.7/lib"
export CPPFLAGS="-I/usr/local/opt/MysqL@5.7/include"
To have launchd start MysqL@5.7 Now and restart at login:
brew services start MysqL@5.7
Or, if you don't want/need a background service you can just run:
/usr/local/opt/MysqL@5.7/bin/MysqL.server start
==> Summary
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。