I am trying to connect to a mysql server that does not have a port number, but does have a socket.
My understanding is that in the past JDBC did not support sockets. Does it now? How do I go about setting up a connection using the socket if I already have the code below?
Sam Bluesman wrote:No - there is no port number when i type 'status' at the MySQL prompt. I have tried the default 3306 and this did not work...
I get the error:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
Ok first, the fact that you can't connect may indicate a firewall or configuration error. Second, *how* are you connecting to the server to send the status command?
Sam Bluesman wrote:I don't have priviliges to see that.
It would definitively answer which port to use. The file usually contains a [client] port value in it.
Either way, how are you connecting to MySQL to send commands? My guess would be you are using the port you are looking for.
OK so I have been using putty to connect to the server and then logged into mysql from there, using the defauly port:22 option.
That seems to have done something but given the code above I am not getting the following error:
com.mysql.jdbc.PacketTooBigException: Packet for query is too large
But this still does not put "Sucess" as it should in the code so not sure if it connecting. Any advice?