We're going to have some problems connecting to the database and sharing it with you today. A TCP/IP connection to the host 127.0.0.1 through port 1433 failed. Error: "Connect timed out of the solution."
Environment: SQL Server 2008 R2 + myeclipse 6.5 + JDK 1.6.24
question:
Java connects SQL Server 2008 through JDBC with the following problem: TCP/IP connections to host 127.0.0.1 via port 1433 failed. Error: "Connect timed out." Verify the connection properties and check that instances of SQL Server are running on the host and that the TCP/IP connection is accepted on this port, and that the firewall does not block TCP connections to this port.
Solution:
1. Open SQL Server Configuration Manager------->sqlserver for msqlserver------->tcp/ip-------> If it is not started, start-------> Right-key property------->ipaddresses------->ip all-------> Change TCP port to 1433;
2. Open SQL Server Configuration Manager------->sql Native Client 10.0 Configuration------->CP/IP-------> If it is not started, start-------> Right-key property-------> change default port to 1433;
3. Control Panel-------> System and Security------->windows FireWall (Windows firewall)------->turnwindows FireWall on or off-------> Shut down Windows Firewall.
The problem has been solved perfectly. In the actual operation will always encounter a variety of errors, the best way is to record it, and then encounter the same problem, save a lot of trouble.