http://netbeans-org.1045718.n5.nabble.com/com-mysql-jdbc-exceptions-jdbc4-CommunicationsException-Communications-link-failure-td2950072.html
It sounds like MySQL server isn't running.
If you are using Windows, make sure mysqld -nt.exe is running. You can use Task Manager to see if the service is running and Control Panel's Administrative Tools|Services dialog to start the service if it is not. On my computer the service name is MySQL .