mac 安装mysql

1、从官网下载并安装;

2、配置环境变量并启动mysql服务:

  临时生效:

  PATH="$PATH":/usr/local/mysql/bin

  永久生效:

  在/etc/paths文件中添加这一行: /usr/local/mysql/bin

  echo $PATH

  sudo /usr/local/mysql/support-files/mysql.server start

3、启动mysql。修改默认root密码
  mysql -u root -p

  set PASSWORD =PASSWORD(' your password')

posted @ 2019-08-12 12:16  黑剑石清  阅读(154)  评论(0编辑  收藏  举报