Re: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Posted by: Peter Sun
Date: January 15, 2010 08:17PM

I kept getting the same error message and spent hours reading suggestions. Finally, it worked. I'm compiling the possible suggested solutions. The last one worked for me.

1. Check the my.cnf [mysqld] settings for the parameters port, bind-address, socket, to make sure these aren't causing problems.
2. Check the files /etc/hosts, /etc/hosts.deny to make sure everything is ok.
3. Check firewall applications like apparmor and ufw.
4. Check to make sure whatever directory mysqld's sockets are have the appropriate permissions.
5. Check to make sure that security settings within the mysql database (user table) permit access from your remote host.
6. Make sure you can telnet OK to localhost 3306, 127.0.0.1 3306, and whatever other IP address your machine is configured to (use ifconfig to find out).
7. If you are using Tomcat with a security manager, make sure it is configured correctly. Or else set "TOMCAT6_SECURITY=no" in /etc/init.d/tomcat6.

Options: ReplyQuote


Subject
Written By
Posted
Re: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
January 15, 2010 08:17PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.