Java program and configuration in VM instance to connect cloud sql using SSL

40 views
Skip to first unread message

Abhishek Jaiswal

unread,
May 18, 2015, 12:20:49 AM5/18/15
to google-a...@googlegroups.com
I am beginner to Google compute engine, i have deployed my project to GCE, but I observe that the IP address of my VM instances(google managed) are not static and get changed in 2-3 days due to which i get communication link failure and null pointer exception.
After browsing the cloud sql documentation, I found that, my problem can be solved by connecting to cloud sql using SSL, and authorizing the IP address 0.0.0.0/0 in cloud instance.
I have successfully retrieved all the certificates (client-cert.pem, client-key.pem, server-ca.pem).
my question is:
1. Now what to do with these files (it is not mentioned in documentation)?
2. What do I need to change in my Java application?
3. What i need to configure in my VM instance?

Since, I never connected any app to database using SSL, its getting difficult for me, Please help me.

Kamran

unread,
May 20, 2015, 1:04:52 PM5/20/15
to google-a...@googlegroups.com, Abhishek Jaiswal

Take a look at the following link for connecting to mySQL securely using SSL. There is also an Java code example:

Sincerely,
Reply all
Reply to author
Forward
0 new messages