Mac下mysql5.7.17安装和配置

安装mysql5.7遇到的坑,mac刚上手,不是很熟,配置个mysql都用了一晚上。

参考 https://segmentfault.com/a/1190000004061246

1.配置环境变量

export PATH=$PATH:$GOROOT/bin:$GOPATH/bin:/usr/local/mysql/bin

2.登录

mysql -u root -p   :按回车
输入密码(安装MySQL时有提示临时密码,通知上也有)...

确定后 提示

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 105
Server version: 5.7.17
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> 

然后设置密码:

set password='密码';

ok!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容