JDBC Commnunications link failure
May 1, 2011 binhng Leave a comment
This is a post about how to install the JDBC driver for MySQL and how I resolved the error "CommunicationsException: Communications link failure".
To create a Java program that make use of a MySQL database, first you have to install Connector/J — JDBC driver for MySQL.
After download the file mysql-connector-java-5.1.16.tar.gz (5.1.16 is the version as of this writing) from http://www.mysql.com/downloads/connector/j/, extract it and copy the file mysql-connector-java-5.1.16-bin.jar to /usr/lib/java/jre/lib/ext/