Two Laptop Bag*
The moose likes JDBC and the fly likes MySQL Communications Error between application server and MySQL server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MySQL Communications Error between application server and MySQL server" Watch "MySQL Communications Error between application server and MySQL server" New topic
Author

MySQL Communications Error between application server and MySQL server

Will Barbee
Ranch Hand

Joined: Oct 01, 2008
Posts: 41
I have an application where the software runs on server 1 and the MySQL database is on server 2.
When I run the application directly on server 2, it runs properly.
When I run it from server 1 I get a database connection error:
"Failed to get database connection.
Communication exception - Communication link failure -
The last packet sent successfully to the server was 0 ms ago.
The driver has not received any packets from the server."

The Java code is:


We believe it is because the Windows Firewall is on. The client does not want to run without the firewall.

Does anyone know the name of the program doing the communicating so we can tell the Windows firewall that it is a trusted program?

I know the names and classes I put in the connection statements but I would not expect those to be the name
of the program which does the actual connecting.>
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

Have you tried opening the port (3306 default/the port MySQL runs) on the firewall? That would be a security issue of course.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
Googling "windows mysql process name" came up with some possiblities.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MySQL Communications Error between application server and MySQL server
 
Similar Threads
Windows 7 Access DB Connection Error "Architecture Mismatch"
Win7 MSAccess Cannot get DB Connection
Processing with two JComboBox's in one JPanel/JFrame