com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception
If you ever get this error:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect
Just check your database configuration, e.g. in the case of mysql, enter the line:
skip-networking
in your my.cnf file
Tags: com.mysql.jdbc.CommunicationsException, Communications link failure, connecting to mysql, SocketException
April 20th, 2008 at 3:28 pm
you mean we need to enter skip-networking in my.cnf?? I got this error when that particular line is present. I dont get this problem while removing that.