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?