Error Resolved: Only One Usage of Socket Address Permitted
When attempting to establish connections with MySQL via PHP, the unexpected error "[2002] Only one usage of each socket address (protocol/network address/port) is normally permitted" may occasionally arise. This issue does not appear to be related to Apache not starting first, as has been reported by others.
In this case, where the error occurs amidst an active Apache session, the problem might lie in the Windows Registry settings. To rectify this issue, follow the steps below:
Create four new DWORD values with the following keys and hexadecimal values:
After making these registry modifications, the error should no longer appear. If the issue persists, please refer to the reference provided in the supplied solution for further troubleshooting steps.
The above is the detailed content of Why Does MySQL Connection Throw '[2002] Only one usage of each socket address...' Error?. For more information, please follow other related articles on the PHP Chinese website!