macbook install mysql
Posted 跳刀不跳
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了macbook install mysql相关的知识,希望对你有一定的参考价值。
- 安装Homebrew,详细步骤参见Homebrew官网。
brew doctor
确认brew在正常工作。brew update
更新包。brew install mysql
安装mysql。log如下:==> Installing dependencies for mysql: openssl
==> Installing mysql dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2l.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring openssl-1.0.2l.sierra.bottle.tar.gz
==> Using the sandbox
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certsand run
/usr/local/opt/openssl/bin/c_rehashThis formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.If you need to have this software first in your PATH run:
echo ‘export PATH="/usr/local/opt/openssl/bin:$PATH"‘ >> ~/.bash_profileFor compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include==> Summary
?? /usr/local/Cellar/openssl/1.0.2l: 1,709 files, 12.2MB
==> Installing mysql
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.7.18_1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mysql-5.7.18_1.sierra.bottle.tar.gz
==> /usr/local/Cellar/mysql/5.7.18_1/bin/mysqld --initialize-insecure --user=chenxu --basedir=/usr/local/Cellar/mysql/5.7.18_1 --datadir=/usr/local/var/mysq
==> Caveats
We‘ve installed your MySQL database without a root password. To secure it run:
mysql_secure_installationMySQL is configured to only allow connections from localhost by default
To connect run:
mysql -urootTo have launchd start mysql now and restart at login:
brew services start mysql
Or, if you don‘t want/need a background service you can just run:
mysql.server start
==> Summary
?? /usr/local/Cellar/mysql/5.7.18_1: 321 files, 232.9MB- 后台启动服务:brew services start mysql
- 前台启动服务:mysql.server start
- 安装后的mysql无root密码,登录mysql:mysql -u root -p
以上是关于macbook install mysql的主要内容,如果未能解决你的问题,请参考以下文章
Macbook pro 13" Installs Ubuntu 18.04
Macbook pro install Tex and TexEditor and common issues (keep updating)
在 M1 macbook 上 brew install elasticsearch 导致“可执行文件中的 CPU 类型错误”错误