1. 程式人生 > >Homebrew(brew)安裝[email protected]及配置

Homebrew(brew)安裝[email protected]及配置

workbench sql local 當前 網上 you auto nav avi

查找並確定自己需要安裝的版本

brew search mysql

==> Formulae
automysqlbackup            mysql-connector-c          [email protected]
mysql                      mysql-connector-c++        [email protected]
mysql++                    mysql-sandbox              [email protected] ?
mysql-client               mysql-search-replace       mysqltuner
mysql-cluster              mysql-utilities

==> Casks
mysql-connector-python     mysql-utilities            navicat-for-mysql
mysql-shell                mysqlworkbench             sqlpro-for-mysql

安裝[email protected]

brew install [email protected]

# 安裝成功後,會看到這樣的提示
/usr/local/Cellar/mysql/5.7.9/bin/mysqld --initialize-insecure --user=comet
==> Caveats
We‘ve installed your MySQL database without a root password. To secure it run:
    mysql_secure_installation

可以看到brew在安裝的時候已經初始過mysql了(不用再像網上說的再執行mysql_install_db命令),且當前沒有密碼於是我按照它的提示,執行命令:

mysql_secure_installation

按照提示設置密碼即可

配置密碼

Homebrew(brew)安裝[email protected]及配置