Mac OS10.11安裝和配置MySQL,主要是圖,步驟我簡(jiǎn)單說明一下。 首先訪問mysql官網(wǎng)并下載安裝程序,當(dāng)然在下載之前你需要線注冊(cè)下賬號(hào)。 網(wǎng)站地址:MySQL下載頁面,下載兩個(gè)安裝程序:MySQL Community Server、MySQL Workbench。 MySQL Community Server 點(diǎn)擊進(jìn)入下載頁面,在頁面最下方,有下載選項(xiàng),請(qǐng)確認(rèn)選擇的平臺(tái)是Mac OS X,然后下載下圖用紅框劃出的安裝包。下載時(shí)需要登錄賬號(hào)。 下載后運(yùn)行,直接運(yùn)行mysql.pkg,在這個(gè)過程中需要十分注意一點(diǎn),記下,提示框中的mysql密碼,可以把密碼信息復(fù)制放到備忘錄中。 安裝結(jié)束后,在系統(tǒng)偏好設(shè)置中能找到MySQL,打開并運(yùn)行。 而后,點(diǎn)擊運(yùn)行MySQL Server,一般自啟動(dòng)是默認(rèn)開著的,如果和我一樣不需要的,可以取消。 做完這一步后,還需要懂得如何從終端打開MySQL,因?yàn)槲覀冞€需要做一項(xiàng)工作。 不然,可能會(huì)有以下兩個(gè)問題: 1、在Workbench連接時(shí)連接失敗,并提示:You must reset your password using ALTER USER statement。。。。 2、在Terminal終端連接時(shí)提示:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 主要是還要重新設(shè)置一次密碼,坑爹?。。?! 打開終端,輸入以下命令: PATH='$PATH':/usr/local/mysql/bin
mysql -u root -p
#輸入密碼
#Terminal顯示
#Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.7.12
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 = PASSWORD('new password');
接下來下載并安裝,步驟基本同上: MySQL Workbench 將workbench拖入。 打開后請(qǐng)看主界面,主界面中的MySQL后跟著兩個(gè)按鈕:第一個(gè)加號(hào)按鈕表示new MySQL Connection新建,第二個(gè)表示Edit MySQL Connections修改。 先新建一個(gè),并輸入密碼。Test Connection成功后,點(diǎn)擊OK。 之后就是這樣。 精彩專題分享:mysql不同版本安裝教程 mysql5.7各版本安裝教程 mysql5.6各版本安裝教程 以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。 |
|