Posts Tagged ‘com.mysql.jdbc.CommunicationsException’

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception

Wednesday, February 13th, 2008

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