Linked Questions
23 questions linked to/from com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure
331 votes
52 answers
1.1m views
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
I'm working on getting my database to talk to my Java programs. Can someone give me a quick and dirty sample program using the JDBC? I'm getting a rather stupendous error: Exception in thread "main"...
6 votes
4 answers
10k views
Problem with not closing db connection while debugging?
I have a Java app that opens a connection to a database at the beginning, and closes it at the end. However, the program doesn't always finish, because an exception is thrown or I am debugging it and ...
4 votes
2 answers
35k views
Can't connect to SOCKS proxy:Connection refused: connect
I'm getting the following error. Check many solutions but didn't get the result. Not Connected to the database - networkcoding com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications ...
14 votes
3 answers
16k views
Reproduce com.mysql.jdbc.exceptions.jdbc4.CommunicationsException with a setup of Spring, hibernate and C3P0
I got this error from the production code: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was36940 seconds ago.The last packet sent ...
1 vote
6 answers
13k views
How to connect to online mysql database from Java desktop app
I pave paid hosting, and i added my database to it. I am trying to connect to this online database from my java desktop application but, i got exception: Communications link failure. here is my code:...
1 vote
5 answers
19k views
Accessing online database with Java [duplicate]
I made a Java program which accesses a database. During the development phase I used a local database (XAMPP with MySQL), but when I tried to access 2 different online databases (a commercial and a ...
1 vote
3 answers
5k views
Java MySQL connection NumberFormat exception?
I am trying to connect to my MySQL database.I believe this is the correct format, however when I execute the code I get a stranger error. Any help is appreciated. con = (Connection) DriverManager....
2 votes
3 answers
3k views
MAMP - WSO2 DSS - Error establishing data source connection: Communications link failure The last packet sent successfully to the server
I'm running MAMP and WSO2 Carbon data service at the same time. What I'm trying to do is adding a new data source by connecting to mysql server. I have added the com.mysql.jdbc.Driver to lib folder. ...
0 votes
1 answer
4k views
jdbc cannot connect to mysql behind nat with port forwarding
This problem has been solved. Here is the list I followed to check the "Connection Refused " error. MySQL server status Is it running ? Is --skip-networking disabled ? Does it bind to address 0.0.0.0 ...
1 vote
1 answer
5k views
Connection between Java and MYSQL server
I know that this issue has been discussed a lot of times but I cannot establish a connection between my Java app and MySQL server. I'm using code form tutorials: import java.sql.Connection; import ...
5 votes
2 answers
2k views
Cannot connect to mysql server from java
I get the error "Communications link failure" at this line of code: mySqlCon = DriverManager.getConnection("jdbc:mysql://**server ip address**:3306/db-name", "mu-user-name", "my-password"); I checked ...
0 votes
1 answer
2k views
Jmeter: Unable to connect to ssl enabled MySQL sever through jdbc connection configuration with useSSL=true
I am trying to do a ssl connection to MySQL server through jmeter. MySQL server is ssl enabled and in jmeter JDBC Connection Configuration- Database URL is configured as: jdbc:mysql://<DBIP>:...
0 votes
0 answers
2k views
Cannot Connect to Port 3306 MySql Server on Centos from Windows
I am trying to play around with MySql on a CentOs7 Server, mostly by ssh on a Windows machine. I cannot seem to connect on to port 3306 from DBVisualizer which I am running on the Windows side. I ...
0 votes
0 answers
667 views
weird error while creating mysql connection in jdbc
Note: I have Googled a LOT and found hundreds of suggestions for this problem but nothing seem to work for me. That's why I am posting a duplicate looking question I am getting a weird error in my ...
0 votes
1 answer
507 views
Connecting to a web database in Java and JSP
I'm trying to learn java and how to use it for web applications . I'm already familiar with PHP so i'm trying to learn how to use JSP since it seems to be the closest thing to PHP in Java. My school ...