赞
踩
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
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。