Windows 下 ZIP 版 MySQL 執行 mysqld -install 報錯 The service already exists,原因是先前安裝殘留的服務未清除。
sc query mysql
若顯示服務存在 (狀態 STOPPED/RUNNING) 需刪除sc delete mysql
成功訊息:[SC] DeleteService SUCCESSmysqld -install
# 輸出: Service successfully installed.
# 查看所有 MySQL 相關服務
sc query type= service state= all | findstr mysql
# 手動啟動/停止
net start mysql
net stop mysql
# 設定啟動類型
sc config mysql start= auto # 自動
sc config mysql start= demand # 手動