Bug #65955 Cannot connect to SQL dadabase after a change of IPv4 address to Internet
Submitted: 20 Jul 2012 3:07 Modified: 21 Jul 2012 16:20
Reporter: Lai Colman Email Updates:
Status: Not a Bug Impact on me:
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.5.4 OS:Windows (Server 2008 R2)
Assigned to: CPU Architecture:Any

[20 Jul 2012 3:07] Lai Colman
I use the connector/NET in a service on a Windows 2008 R2 platform to connect to a MySQL database hosted on a Linux server. When I put the Windows 2008 behind a NAT with IPv4 address in the range of 192.168.1.xxx, everything work fines. But when I move the Windows 2008 to the same network sub-net as the MySQL server that both exposed to Internet, the Windows 2008 can access to Internet, but cannot contact the SQL server, it always throw a exception as:

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond".

If I move the Windows 2008 back to 192.168.1.xxx (behind a NAT), it works again.
Can anyone tell me what is going on?


How to repeat:
Same as the description.
[20 Jul 2012 4:28] Lai Colman
I have solved the problem. It is due to the DNS servers provided by ISP can resolve the domain name for that IP address. The SQL server do a reverse DNS look up finds they are not matched, so refuse to connect.