Windows 環境下 MySQL 服務啟動失敗,報錯 1067 進程意外終止。常規修復 my.ini、重註冊服務均無效。
netstat -aon | findstr "3306"tasklist | findstr "416"YoukuClient.exe(優酷客戶端/加速器)。taskkill /PID 416 /F
net start mysql
並將優酷加速器設為「不開機自啟」、「不駐留任務欄」,避免再次佔用。
my.ini:[mysqld]
port=3307net stop mysql && net start mysql-P 3307。@echo off
echo === 檢查 3306 端口佔用 ===
netstat -aon | findstr ":3306"
echo.
echo === 對應進程 ===
for /f "tokens=5" %%i in ('netstat -aon ^| findstr ":3306"') do tasklist /fi "PID eq %%i"
pause