When we connect to the database, there will always be some problems. Today, I will share with you the failure of the TCP/IP connection connected to the host 127.0.0.1 through the port 1433. Error: "Connect Timed Out solution.
Environment: SQLServer 2008 R2 + MyEclipse 6.5 + JDK 1.6.24
question:
Java connects SQLServer 2008 through JDBC, and the following problems occur: connected to the host 127.0.0.1 TCP/IP connection through the port 1433. Error: "Connect Timed Out. Please verify the connection attribute and check that the instance of the SQL Server is running on the host, and accepts the TCP/IP connection at this port.
Solution:
1. Open the SQLServer configuration manager -------> SQLServer for MSQLServer --------> TCP/IP -------> If it is not started, start ------------------- > Right-click attributes ------> ipaddresses --------> IP ALL --------> Change the TCP port to 1433;
2. Open the SQLServer configuration manager -------> SQL Native Client 10.0 Configuration --------> CP/IP --------> -> Right-click attributes -------> Change the default port (default port) to 1433;
3. 控制面板------->系统和安全------->Windows FireWall(Windows 防火墙)------->TurnWindows FireWall on or off-------> Turn off Windows Firewall.
The problem was perfectly resolved. In actual operation, you always encounter various mistakes. The best way is to record it. When you encounter the same problem in the future, you will save a lot of trouble.