当前位置:   article > 正文

home brew 安装mysql_Mac 安装MySQL(Homebrew)

homebrew安装mysql

Mac 安装MySQL(Homebrew)

一、安装

安装Homebrew

1、执行安装命令

brew install mysql

localhost:~ local$ brew install mysql

==> Downloading https://homebrew.bintray.com/bottles/mysql-5.6.26.yosemite.bottle.1.tar.gz

Already downloaded: /Library/Caches/Homebrew/mysql-5.6.26.yosemite.bottle.1.tar.gz

==> Pouring mysql-5.6.26.yosemite.bottle.1.tar.gz

==> Caveats

A "/etc/my.cnf" from another install may interfere with a Homebrew-built

server starting up correctly.

2、启动mysql

mysql.server start

2.1、首次连接:

mysql -uroot

3、停止mysql

mysql.server stop

4、修改root密码:

/usr/local/bin/mysqladmin -u root password 1234567890(root的新密码)

# /usr/local/bin/mysqladmin -> ../Cellar/mysql/8.0.19_1/bin/mysqladmin

5、执行安全设置

mysql_secure_installation

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/529613
推荐阅读
相关标签
  

闽ICP备14008679号