General Solution for database connection failure

Source: Internet
Author: User

General Solution for database connection failure

Today, we have built a development environment.

The development environment consists of two machines. My old notebook A is now used as A server dedicated to database servers. Another machine, B, is used as a development machine. After installing various software, my development machine B needs to access database server A. However, it cannot be connected !!!

First, describe the operating system and software. Both of my machines use the win7 operating system and the db2 database installed on the database server (tested, the database is correctly installed and can provide data services ), the development software for machine development is eclipse. A running system wants to access data in the db2 database but cannot connect to it. After searching for a solution on the Internet, the following solutions are summarized.

Three-step solution:

① Check whether the two networks are connected and ping to determine network problems

②. Check whether the db port can be connected. telnet to determine whether the firewall is restricted.

③. If you can do anything above ① ②, check whether the database account's authorization grants access to the IP address of the machine and determine the database's permission control.

My problem is that there is a problem at ②. Originally, the default firewall of Windows 7 would not allow access to port 50000 of db by default. As a private development environment, my solution is to simply turn off the firewall of the machine on the database server. In this way, the problem is solved. In fact, in the production environment, it is best not to do this. We need dedicated management personnel to open the access permission for this port. I am just a lazy. Specific how to open win7 port access permissions, please refer to the solution provided by the http://jingyan.baidu.com/article/f96699bbadafca894f3c1b7a.html, I am not elaborate.

Related Article

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.