標籤:
Mac OS10.11安裝和配置MySQL,主要是圖,步驟我簡單說明一下。
首先訪問mysql官網並下載安裝程式,當然在下載之前你需要線註冊下帳號。
網站地址:MySQL下載頁面,下載兩個安裝程式:MySQL Community Server、MySQL Workbench。
MySQL Community Server
點擊進入下載頁面,在頁面最下方,有下載選項,請確認選擇的平台是Mac OS X,然後下載用紅框划出的安裝包。下載時需要登入帳號。
下載後運行,直接運行mysql.pkg,在這個過程中需要十分注意一點,記下,提示框中的mysql密碼,可以把密碼資訊複製放到備忘錄中。
安裝結束後,在系統喜好設定中能找到MySQL,開啟並運行。
而後,點擊運行MySQL Server,一般自啟動是預設開著的,如果和我一樣不需要的,可以取消。
做完這一步後,還需要懂得如何從終端開啟MySQL,因為我們還需要做一項工作。
不然,可能會有以下兩個問題:
1、在Workbench串連時串連失敗,並提示:You must reset your password using ALTER USER statement。。。。
2、在Terminal終端串連時提示:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
主要是還要重新設定一次密碼,坑爹啊!!!
開啟終端,輸入以下命令:
PATH="$PATH":/usr/local/mysql/binmysql -u root -p#輸入密碼#Terminal顯示#Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 10Server version: 5.7.12Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.mysql>#SET PASSWORD = PASSWORD(‘new password‘);
接下來下載並安裝,步驟基本同上:
MySQL Workbench
將workbench拖入。
開啟後請看主介面,主介面中的MySQL後跟著兩個按鈕:第一個加號按鈕表示new MySQL Connection建立,第二個表示Edit MySQL Connections修改。
先建立一個,並輸入密碼。Test Connection成功後,點擊OK。
之後就是這樣。
Mac OS系統安裝Mysql