天天看點

Homebrew 安裝mysql

在mac上安裝軟體,無疑安裝一個brew是個很好的選擇,關于brew是什麼,怎麼安裝建議去brew官網檢視,

安裝完成之後,安裝其他的軟體就很友善了。

先搜尋下

cmd:~ dongjunjie$ brew search mysql

automysqlbackup               mysql++                       mysql-connector-c             mysql-sandbox                 mysql-utilities               [email protected]

mysql                         mysql-cluster                 mysql-connector-c++           mysql-search-replace          [email protected]                     mysqltuner

caskroom/cask/mysql-connector-python                        caskroom/cask/mysql-shell                                   caskroom/cask/navicat-for-mysql

caskroom/cask/sqlpro-for-mysql 

決定安裝5.6 

cmd:~ dongjunjie$ brew install [email protected]

Updating Homebrew...

==>Auto-updated Homebrew!

Updated 1 tap (homebrew/core).

==>New Formulae

grakn

==>Updated Formulae

ammonite-repl         conan                 git-town              lablgtk               [email protected]          notmuch               paket                 sqlmap

ansible               django-completion     imake                 libgcrypt             metricbeat            npth                  rancher-cli           terragrunt

aws-sdk-cpp           filebeat              jhipster              libvirt               mono                  ntopng                re2

awscli                freeradius-server     kibana                lmdb                  mtr                   packetbeat            sourcery

==>Downloading https://homebrew.bintray.com/bottles/[email protected]_1.sierra.bottle.tar.gz

######################################################################## 100.0%

==>Pouring [email protected]_1.sierra.bottle.tar.gz

==>Using the sandbox

==>/usr/local/Cellar/[email protected]/5.6.36_1/bin/mysql_install_db --verbose --user=dongjunjie --basedir=/usr/local/Cellar/[email protected]/5.6.36_1 --datadir=/usr/local/var/mysql --tmpdir=/t

==>Caveats

A "/etc/my.cnf" from another install may interfere with a Homebrew-built

server starting up correctly.

MySQL is configured to only allow connections from localhost by default

To connect:

    mysql -uroot

This formula 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 this software first in your PATH run:

  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:

    LDFLAGS:  -L/usr/local/opt/[email protected]/lib

    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

  /usr/local/Cellar/[email protected]/5.6.36_1: 346 files, 154.2MB

上面會告訴你的很清楚 ,如果現在啟動并讓其開機啟動如下操作

 否則,如果不想做後段服務啟動動可以這樣

本文轉自茄子_2008部落格園部落格,原文連結:http://www.cnblogs.com/xd502djj/p/6936543.html,如需轉載請自行聯系原作者。

繼續閱讀