TCP/IP connection to host 127.0.0.1 via port 1433 failed, error: "Connect timed out" solution _java

Source: Internet
Author: User

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.

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.