當數據庫出現10055和10048錯誤時,處理辦法:
第一 鏈接超時設置
(1)打開注冊表:regedit
找到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpTimedWaitDelay
如注冊表中沒有TcpTimedWaitDelay這個項目,請增加項目,並設置為雙字節(DWORD)類型數值設置為30 即可
(2)殺掉 administrator -> explorer
(3)重啟電腦
第二 動態端口默認范圍 49152 - 65535
mysql 動態端口
netsh int ipv4 set dynamicport tcp start=10000 num=50000
netsh int ipv4 set dynamicport udp start=10000 num=50000
netsh int ipv6 set dynamicport tcp start=10000 num=50000
netsh int ipv6 set dynamicport udp start=10000 num=50000
可以寫成bat腳本,統一執行:
@echo off&setlocal enabledelayedexpansion
echo TcpTimedWaitDelay 30
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "TcpTimedWaitDelay" /t REG_DWORD /d 30 /f
echo ipv4 tcp
netsh int ipv4 set dynamicport tcp start=10000 num=50000
echo ipv4 udp
netsh int ipv4 set dynamicport udp start=10000 num=50000
echo ipv6 tcp
netsh int ipv6 set dynamicport tcp start=10000 num=50000
echo ipv6 udp
netsh int ipv6 set dynamicport udp start=10000 num=50000
pause