Homebrew 安裝mysql


在mac上安裝軟件,無疑安裝一個brew是個很好的選擇,關於brew是什么,怎么安裝建議去brew官網查看,

附上地址:brew官網  還有一篇博文 http://www.cnblogs.com/xd502djj/p/6923690.html

安裝完成之后,安裝其他的軟件就很方便了。

 

先搜索下

cmd:~ dongjunjie$ brew search mysql

automysqlbackup               mysql++                       mysql-connector-c             mysql-sandbox                 mysql-utilities               mysql@5.6

mysql                         mysql-cluster                 mysql-connector-c++           mysql-search-replace          mysql@5.5                     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 mysql@5.6

Updating Homebrew...

==>Auto-updated Homebrew!

Updated 1 tap (homebrew/core).

==>New Formulae

grakn

==>Updated Formulae

ammonite-repl         conan                 git-town              lablgtk               mariadb@10.1          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/mysql@5.6-5.6.36_1.sierra.bottle.tar.gz

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

==>Pouring mysql@5.6-5.6.36_1.sierra.bottle.tar.gz

==>Using the sandbox

==>/usr/local/Cellar/mysql@5.6/5.6.36_1/bin/mysql_install_db --verbose --user=dongjunjie --basedir=/usr/local/Cellar/mysql@5.6/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/mysql@5.6/bin:$PATH"' >> ~/.bash_profile

 

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

    LDFLAGS:  -L/usr/local/opt/mysql@5.6/lib

    CPPFLAGS: -I/usr/local/opt/mysql@5.6/include

 

 

To have launchd start mysql@5.6 now and restart at login:

  brew services start mysql@5.6

Or, if you don't want/need a background service you can just run:

  /usr/local/opt/mysql@5.6/bin/mysql.server start

==>Summary

🍺  /usr/local/Cellar/mysql@5.6/5.6.36_1: 346 files, 154.2MB

 

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

 

To have launchd start mysql@5.6 now and restart at login:

  brew services start mysql@5.6

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

Or, if you don't want/need a background service you can just run:

  /usr/local/opt/mysql@5.6/bin/mysql.server start

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM