Windows安裝MySQL8
0.下載
社群版
- 最新版:https://dev.mysql.com/downloads/installer/
- 各版本:https://downloads.mysql.com/archives/installer/
Windows (x86, 32-bit), MSI Installer,迅雷下載
企業版
...
1. 安裝
1). 雙擊官方下來的安裝包檔案
2). 根據安裝提示進行安裝



安裝MySQL的相關元件,這個過程可能需要耗時幾分鐘,耐心等待。



輸入MySQL中root使用者的密碼,一定記得記住該密碼



2. 配置
安裝好MySQL之後,還需要配置環境變數,這樣才可以在任何目錄下連線MySQL。
1). 在此電腦上,右鍵選擇屬性
2). 點選左側的 "高階系統設定",選擇環境變數

3). 找到 Path 系統變數, 點選 "編輯"

4). 選擇 "新建" , 將MySQL Server的安裝目錄下的bin目錄新增到環境變數

C:\Program Files\MySQL\MySQL Server 8.0\bin
3.驗證MySQL是否安裝成功
啟動關閉MySQL
UI介面
services.msc-MySQL80-右鍵啟動/關閉
命令列
管理員執行cmd
net start mysql80
net stop mysql80
4.客戶端連線
命令列
方式一︰MySQL提供的客戶端命令列工具
MySQL 8.0 Command Line Client - Unicode
root
方式二︰系統自帶的命令列工具執行指令(配置環境變數)
mysql [-h 127.0.0.1][-P 3306] -u root -p
mysql -u root -p
UI介面
IDEA、DataGrip、Navicat