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 receive the following error in the DBVisualizer GUI:
An error occurred while establishing the connection:
Long Message:
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.
Details:
Type: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
SQL State: 08S01
I have no problem sshing through port 22. There are a number of posts on this matter including these and others from UnixStack:
Can't connect to MySQL server on (ip or domain name)
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure
I have taken a look at each and tried to implement them but nothing seems to be working. I have reconfigured the iptables a number of times. I have run nmap on the ports with this output.
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
3306/tcp open mysql
No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).
The second post did suggest that it could be JDBC issues, but I am not exactly sure how to check that, especially since I am trying to connect through an IDE.