brew安裝MySQL V5.7



安裝

brew install mysql@5.7                // 安裝
brew link --force mysql@5.7      // 鏈接
brew services start mysql@5.7 // 啟動服務

brew services stop mysql@5.7     //停止
brew services restart mysql@5.7 //重啟

設置密碼

啟動之后,輸入一行命令

mysql_secure_installation

5.7.x對設置的密碼有嚴格的要求,分為LOW、MEDIUM、STRONG三個等級,對應要求如下:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

選low即可,輸入8位,我這里使用12345678 ,其他一路y確認即可。

啟動

➜  ~ brew services start mysql@5.7
==> Successfully started `mysql@5.7` (label: homebrew.mxcl.mysql@5.7)

賬號:root 密碼:12345678


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM