安裝mysql5.7遇到的坑,mac剛上手,不是很熟,配置個mysql都用了一晚上。
參考 https://segmentfault.com/a/1190000004061246
1.配置環(huán)境變量
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!