Can’t connect to MySQL server(10048)

We run Windows IIS + PHP, and we realise that the message Can’t connect to MySQL server(10048) do appear randomly. and we check out “netstat -an”, the port will not connect above 5000

The article Q196271 has solved our problem.

1. Start Registry Editor.
2. Locate the following subkey in the registry, and then click Parameters:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

3. On the Edit menu, click New, and then add the following registry entry:

Value Name: MaxUserPort
Value Type: DWORD
Value data: 65534
Valid Range: 5000-65534 (decimal)
Default: 0×1388 (5000 decimal)
Description: This parameter controls the maximum port number that is used when a program requests any available user port from the system. Typically , ephemeral (short-lived) ports are allocated between the values of 1024 and 5000 inclusive.

4. Quit Registry Editor.

Note An additional TCPTimedWaitDelay registry parameter determines how long a closed port waits until the closed port can be reused.

Leave a Reply