0

Currently I have a Java project that connects to phpadmin.

While I run this program inside Eclipse, everything is fine. But when I export this project and required libraries to runnable jar file and execute this jar file through cmd, it gives me this error:

com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure.
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

I searched online that this error comes from incorrect URL or port, but since I can connect to database inside eclipse I guess that is not the problem.

So how can I fix this?

Mark Rotteveel
  • 90,369
  • 161
  • 124
  • 175

0 Answers0