1、
安装mysql5.7版本,不指定版本就默认安装最新的,目前最新是8
brew install mysql@5.7
2、
安装完进入/usr/local/Cellar/mysql@5.7目录,可以看到安装了5.7的哪些版本,我的是5.7.25
3、
打开.zshrc文件,在PATH下面加上这行export PATH=${PATH}:/usr/local/Cellar/mysql@5.7/5.7.25/bin,这样就能直接用mysql的bin目录的命令了
4、
启动mysql是mysql.server start,停止是mysql.server stop,启动后就可以直接连接了mysql -uroot -p,默认是没有密码的,回车就能进去了
5、
mysql读取配置的顺序是/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf,brew安装完的默认是有一份配置在/usr/local/etc/my.cnf,后续需要改配置就改这个文件好了。

brew安装mysql的更多相关文章

  1. Mac用brew安装MySQL

    1.先安装brew 网址:https://brew.sh/ 复制命令:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent ...

  2. brew 安装 mysql

    在网上看到各种教程,都会出现ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.soc ...

  3. mac使用brew安装mysql

    1.安装mysql #brew install mysql 报错 Error: The following directories are not writable by your user: /us ...

  4. mac brew安装mysql

    mac不自带mysql,这里需要重新安装,方法依然很简单 brew install mysql unset TMPDIR mysql_install_db --verbose --user=`whoa ...

  5. macOS 使用brew安装mysql,客户端连接不上

    macos 使用brew安装mysql8.0后,使用mysql官方的workbench连接不上,出现√ mysql8.0 Authentication plugin 'caching_sha2_pas ...

  6. Homebrew(brew)安装MySQL成功后无法登录

    Homebrew简称brew,OSX上的软件包管理工具,在Mac终端可以通过brew安装.更新.卸载各种软件,(简直就是神器级武器). 废话不多说,没安装brew自己去百度学习安装,这里就不多说了. ...

  7. mac使用brew安装mysql报RROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    使用mac安装mysql安装完后运行 mysql -uroot -p 报了 ERROR 2002 (HY000): Can't connect to local MySQL server throug ...

  8. Homebrew(brew)安装MySQL@5.7及配置

    查找并确定自己需要安装的版本 brew search mysql ==> Formulae automysqlbackup mysql-connector-c mysql@5.5 mysql m ...

  9. Mac中使用brew安装mysql

    若不考虑版本直接执行以下命令 brew install mysql 若要选择版本只要加上@版本即可,例如 brew install mysql@5.7 安装完后启动mysql mysql.server ...

随机推荐

  1. 2017北大校赛 J题 pairs

    题目链接 http://poj.openjudge.cn/practice/C17J/ orz 原来是一道无脑枚举题目 只是很卡常数而已 复杂度算错也是很醉orz 当时怎么没想着优化常数呢 题解:枚举 ...

  2. [洛谷P4001][BJOI2006]狼抓兔子

    题目大意:给你一个n*m的网格图,有三种边,横的,纵的和斜的,要你求出它的最小割 题解:网络流 卡点:1.无向图,反向弧容量应和正向弧相同 C++ Code: #include<cstdio&g ...

  3. vector 搜索

    http://classfoo.com/ccby/article/cIBahI #include <iostream> #include <algorithm> #includ ...

  4. Consumer [分组背包]

    Consumer Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/65536 K (Java/Others) Total Subm ...

  5. 适用于实数范围的中缀表达式的 + - * / ( ) 计算(C++实现)

    核心算法: mid=FormatMid(mid); //格式化中缀表达式 JudgeLegalMid(mid); //判断中缀表达式的合法性 MidToPost mtp(mid); mtp.ToPos ...

  6. [poj 3693]后缀数组+出现次数最多的重复子串

    题目链接:http://poj.org/problem?id=3693 枚举长度L,看长度为L的子串最多能重复出现几次,首先,能出现1次是肯定的,然后看是否能出现两次及以上.由抽屉原理,这个子串出现次 ...

  7. Good Substrings CodeForces - 271D

    You've got string s, consisting of small English letters. Some of the English letters are good, the ...

  8. codeforces 1060 B

    https://codeforces.com/contest/1060/problem/B 题意:给你一个数C ,你要找到两个数A.B,使得A+B=C并且A的每个位的数的和最大,求最大的和是多少 题解 ...

  9. shell监控进程是否存在

    1.直接给代码:我这个是两个程序.多半要写成函数 [root@java1 src]# cat checkprocess.sh #!/bin/bashcheckprocess(){ps -ef|grep ...

  10. rsync 同步

    1./usr/bin/rsync -vzrtopg --progress  --include "weibo-service-server" --exclude "/*& ...