开发者社区> 长征2号> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

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


本文转自茄子_2008博客园博客,原文链接:http://www.cnblogs.com/xd502djj/p/6936543.html,如需转载请自行联系原作者。

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
Mysql的编译安装与配置
一、安装apache 二、Mysql的安装与配置 三、注意 四、启动MYSQL
10 0
安装mysql5.7
下载mysql5.7.tar.gz直接解压运行mysql
64 0
MySQL——安装
MySQL——安装 1. 下载源: http://repo.mysql.com/yum/mysql-8.0-community/el/7/x86_64/mysql80-community-release-el7-2.noarch.rpm 该源目前为8.0版本,如果需要最新请退至根目录找。
1058 0
安装mysql
安装mysql
1152 0
MySql安装种种
  用zip包安装的时侯,会出现各种服务无法启动;用安装包装的5.7后,在安装08cms时会报个错误:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement。
796 0
+关注
1703
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载