Mac安裝 brew mysql redis
阿新 • • 發佈:2020-12-17
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 [email protected]
wang@localhost:$ brew install [email protected]
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles/mysql%405.7-5.7.29.catalina.bottle.tar
######################################################################## 100.0%
==> Pouring [email protected]
==> /usr/local/Cellar/[email protected]/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
[email protected] 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 [email protected] first in your PATH run:
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> /Users/jinping/.bash_profile
For compilers to find [email protected] you may need to set:
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
To have launchd start [email protected] now and restart at login:
brew services start [email protected]
Or, if you don't want/need a background service you can just run:
/usr/local/opt/[email protected]/bin/mysql.server start
==> Summary