Connecting to AWS MySQL Server

I thought I had setup my connection setting correctly, but kept coming up with this error specially because of the SSH tunnel:

Long Message:
Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Details:
   Type: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
   SQL State: 08S01

Turns out I had to set my Database Server to localhost and not to the address of the EC2 instance.

MySQL Connection Settings

Leave a Reply

Your email address will not be published.