Java connectivity to MemSql managed service

I have created java program to connect to the managed cloud service but I am unable to connect to managed service from java program.
The stack trace tells could not connect to address. How to get correct connection URL to connect with my managed service.

Here is the error,
java.sql.SQLNonTransientConnectionException: Could not connect to address=( : Socket fail to connect to, port:3306.

Dear anchandu2104,

Thank you for trying out MemSQL Helios! Looking at your error, the connection URL you specified is correct.

However, it may be that your free trial cluster expired and was terminated before your java program could connect. Currently our free trial clusters only lasts 8 hours.

I would suggest that you retry the free trial cluster again, but do remember to put in the new connection URL.

Thanks, ghim