Windows could not start the MySQL service on Local Computer. Error 1067: The process terminated unexpectedly.
# 查看 3306 端口佔用情況 netstat -aon | findstr "3306" # 輸出示例 TCP 0.0.0.0:3306 0.0.0.0:0 LISTENING 416 # PID 416 佔用了 3306 端口
tasklist | findstr "416" # 輸出示例 explorer.exe 416 Console 1 12,345 K # 驚人發現:explorer.exe (資源管理器) 佔用了 3306!
安裝了優酷/迅雷等 P2P 加速軟件,其內嵌組件劫持系統進程 (explorer.exe/svchost.exe) 監聽常用端口 (3306, 80, 443 等) 用於 P2P 傳輸,導致正規服務無法綁定端口。
taskkill /PID 416 /F # explorer.exe 會自動重啟,但重啟後通常不再佔用 3306
my.ini 中 port=3307,但需同步修改所有客戶端連接配置net start mysql # The MySQL service is starting. # The MySQL service was started successfully.
netstat -an | findstr PORT 預檢步驟Error 1067 多為「進程意外終止」,Windows 下 90% 由端口佔用引起。netstat -aon | findstr PORT → tasklist | findstr PID → taskkill /F 三步法可快速定位解決。服務器環境純淨化是根治之道。