• 欢迎访问趣尚博客、分享互联网、软件、编程、创业、英语、VPS 推荐使用最新版火狐浏览器和Chrome浏览器访问本网站
  • 如果您喜欢我的博客,那么请使用Ctrl+D 收藏吧!

mac使用brew安装mysql5.7

Mysql qushang 3年前 (2017-10-29) 1567次浏览

 

brew update //更新brew mysql版本

brew info mysql //查看mysql详细信息

brew install mysql //安装mysql

 

看到提示

You can try again using:
brew link mysql
==> /usr/local/Cellar/mysql/5.7.20/bin/mysqld –initialize-insecure –user=patrick –basedir=/usr/local/Cellar/mysql/5.7.20 –datadir=/usr/local/var/mysql –tmpdir=/tmp
==> Caveats
We’ve installed your MySQL database without a root password. To secure it run:
mysql_secure_installation

MySQL is configured to only allow connections from localhost by default

To connect run:
mysql -uroot

To have launchd start mysql now and restart at login:
brew services start mysql
Or, if you don’t want/need a background service you can just run:
mysql.server start

使用软链接

brew link mysql

报错 Error: Could not symlink share/man/man8/mysqld.8

修改权限

sudo chown -R ‘pengting’ /usr/local

pengting为你的mac用户名

sudo chown -R ‘patrick’ /usr/local

Linking /usr/local/Cellar/mysql/5.7.20… 93 symlinks created

提示创建成功

开始设置密码

mysql_secure_installation

根据提示设置

 

 

 

 

 


极客公园 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:mac使用brew安装mysql5.7
喜欢 (0)
[399397742@qq.com]
分享 (0)