Your exception seems to indicate that your MySQL server is not available.
Exception in thread “main” com.mysql.exceptions.jdbc4.
CommunicationsException:
Communication link failure. The last packet sent successfully to the server was 0 milliseconds ago. No packet has been received by the driver from the server.
Now, trying from the terminal:
Mysql -u username -p
You will be asked for the password associated with the username. Does the MySQL client connect after providing the correct password?
You might have to start MySQL from the preferences. If not, you can also set it to run at the startup.