mac 使用brew 安装 mysql

1.首先安装brew

brew官网首页
  • 就是这句话了

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

由于我这边已经安装过了。
所以我直接更新一下brew update 一下就行了。


图1

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';
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容