当前位置:首页 > 操作系统 > MacOs

Mac安装 brew mysql redis

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

标签:bin,5.7,redis,Mac,usr,mysql,brew,local
来源: https://blog.csdn.net/beginner_qinsu/article/details/111307350

关于我们 | 联系我们 | 留言反馈

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐