mac 使用brew 安装 mysql
2018-11-08 本文已影响5人
KelvinYip
1.首先安装brew
- 直接进入 brew 官网 https://brew.sh/

- 就是这句话了
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
由于我这边已经安装过了。
所以我直接更新一下brew update 一下就行了。

2.Mysql安装
brew install mysql
3.开启mysql
mysql.server start
4.注意 由于MySql 8.0 换了新的身份验证插件(caching_sha2_password), 原来的身份验证插件为(mysql_native_password)
- 查询一下:
select user,host,plugin,authentication_string from user; - 更新并修改一下root的密码
ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY '11111111';