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.