Home >Database >Mysql Tutorial >How to Resolve the '[2002] Only One Usage of Each Socket Address' Error in MySQL/PHP on Windows XP with XAMPP?

How to Resolve the '[2002] Only One Usage of Each Socket Address' Error in MySQL/PHP on Windows XP with XAMPP?

Susan Sarandon
Susan SarandonOriginal
2024-11-11 08:10:03689browse

How to Resolve the

MySQL/PHP Error: Resolving "[2002] Only One Usage of Each Socket Address" on Windows XP with XAMPP

Encountering the error "[2002] Only one usage of each socket address (protocol/network address/port) is normally permitted" in a MySQL/PHP environment can be frustrating. While most reported cases arise during Apache initialization, this issue can also occur even after Apache is running, leaving users baffled.

For those experiencing this error after Apache has successfully launched, a solution lies in modifying the Windows Registry. Navigate to the following path in the Registry Editor:

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Create four new DWORD keys within this path, with the following names and values:

  • TcpTimedWaitDelay: 0000001e (hex)
  • MaxUserPort: 0000fffe (hex)
  • TcpNumConnections: 00fffffe (hex)
  • TcpMaxDataRetransmissions: 00000005 (hex)

Restart your server after making these changes. Refer to the provided screenshot for visual guidance.

This modification increases the number of simultaneous connections allowed by the system and resolves the "2002" error for PHP/MySQL applications.

The above is the detailed content of How to Resolve the '[2002] Only One Usage of Each Socket Address' Error in MySQL/PHP on Windows XP with XAMPP?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn