Mysql connection error (10048) solution _ MySQL

Source: Internet
Author: User
Mysql connection error (10048) solution bitsCN.com
The solution Can't connect to MySQL server on 'localhost' (10048), which is generally seen in the use of mysql windows 2003 server. The cause of the error:
Applications need to be quickly released and create new connections, but the connections in TIME_WAIT exceed the default value, resulting in low throughput. solution:
Two windows registry keys closely related to this error: TcpTimedWaitDelay and MaxUserPort. tcpTimedWaitDelay determines the time required before a TCP/IP address can release closed connections and reuse its resources. the time interval between disabling and releasing is generally referred to as the TIME_WAIT status or twice the maximum segment lifecycle (2MSL) status. during this period, the cost of re-opening a connection to the client and server is less than creating a new connection. reduce the value of this entry to allow TCP/IP to release closed connections more quickly and provide more resources for new connections. maxUserPort determines the maximum number of ports used by the system to request any available user ports. The maximum port number that can be specified by TCP/IP. if the maximum port number of a TCP connection is greater than 5000, the local computer returns the following error message WSAENOBUFS (10055): The system does not have enough buffer or cannot perform socket operations because the queue is full, as a result, the 10048 error of the application is caused. open Registration Table editor regedit TcpTimedWaitDelay settings: Find the HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/TCPIP/Parameters registry subkey and create a new REG_DWORD value named TcpTimedWaitDelay. set this value to decimal 30, the hexadecimal value is 0 × 0000001e. the waiting time is 30 seconds. The default value of this item is 0xF0 (in hexadecimal notation), and the waiting time is set to 240 S. MaxUserPort is set (maximum port connection is added ): locate the HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/TCPIP/Parameters registry subkey and create a new REG_DWORD value named MaxUserPort. set this value to decimal minimum 32768. The value will be 30 seconds in waiting time. Restart windows. Default value of this item: 5000 (decimal) to close the registry editor and restart windows. Author: zhentherbitsCN.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.