1、下載
官網:https://dev.mysql.com/downloads/installer/
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141679101.png)
##2、安裝
(1)雙擊mysql-installer-community-8.0.28.0.msi
(2)選擇Custom模式,自訂安裝產品
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141787730.png)
( 3)選擇需要的產品,具體步驟如圖所示
點擊具體產品,會出現
Adcanced Options,自訂此產品的安裝路徑
安裝完後發現有遺漏,需要添加新的產品,重新雙擊mysql-installer-community-8.0.28.0.msi再來一次即可
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141799445.jpg)
(4)點擊Execute,環境檢驗
MySQL這邊會檢驗有沒有安裝Visual C 等,如果沒有則會自動安裝
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141716853.png)
#(5)安裝產品,直接點選Execute,然後Next
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141787930.png)
(6)產品配置,直接Next
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141763991.png)
#3、MySQL 配置
(1)採用預設配置,Next
服務類型選擇Development Computer,將使用較小的內容來運行mysql server,對於小型軟體、學習是完全夠用的
(2)認證方法,Next
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141784194.png)
(3)設定密碼,Next
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141853629.png)
(4)設定service名稱和權限、是否開機啟動
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141893235.png)
(5)將設定內容套用到我們的mysql server,點選「Execute」
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141820629.png)
(6)設定完成,點選Finish
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141837313.png)
點選Next
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141853643.png)
(7)安裝完成,點選Finish
(8)驗證,輸入上邊設定的root密碼
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141860176.jpg)
4、環境設定
(1)右鍵點選「我的電腦” → “搞基系統設定” → "環境變數"
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141939109.jpg)
#(2)新增一條環境變數
![Windows如何安裝MySQL8.0.28.0.msi](https://img.php.cn/upload/article/000/887/227/168571141951495.jpg)
(3)校驗:在cmd中輸入mysql -uroot -p,然後輸入密碼
##
以上是Windows如何安裝MySQL8.0.28.0.msi的詳細內容。更多資訊請關注PHP中文網其他相關文章!