官方網站http://dev.mysql.com/downloads/下載該軟件mysql
安裝類型設置窗口,安裝類型界面各設置項含義:web
Developer Default 默認安裝類型sql
Server only 僅做爲服務器數據庫
Client only 僅做爲客戶端服務器
Full 徹底安裝類型測試
Custom 用戶自定義安裝類型網站
根據本身的狀況選擇安裝,咱們這裏以自定義安裝爲例:spa
1.Developer Machine(開發機器),我的用桌面工做站,佔用最少的系統資源3d
2.Server Machine(服務器),MySQL服務器能夠同其它應用程序一塊兒運行,例如FTP、email和web服務器。MySQL服務器配置成使用適當比例的系統資源。code
3.Dedicated MySQL Server Machine(專用MySQL服務器):該選項表明只運行MySQL服務的服務器。假定運行沒有運行其它應用程序。MySQL服務器配置成使用全部可用系統資源。
根據本身狀況選擇便可,通常WEB服務器選擇第二個,Server Machine便可!我的電腦安裝選擇第一個,Developer Machine比較好。
對應的界面中,咱們須要設置root用戶的密碼,在「MySQL Root password」(輸入新密碼)和「Repeat Password」(確認)兩個編輯框內輸入指望的密碼。也能夠單擊下面的【Add User】按鈕另行添加新的用戶。(注:Current Root Password:爲空;若是輸入密碼了在後面安裝會報錯)
在開始菜單欄->附件->右鍵命令提示符->以管理員身份運行:
net start MySQL56 爲啓動數據庫服務命令;
net stop MySQL56 爲中止數據庫服務命令。
進入bin目錄,執行mysql -u root -p 回車輸入密碼
D:\>cd D:\Programs\WAPM\MySQL\MySQL Server 5.6\bin D:\Programs\WAPM\MySQL\MySQL Server 5.6\bin>mysql -u root -p Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.24-log MySQL Community Server (GPL) Copyright (c) 2000, 2015, 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>