At ScaleGrid, we make it easy to connect your fully managed MySQL hosting deployment from your application using your Connection String. MySQL deployments at ScaleGrid are available with and without SSL enabled, and you can connect to them in either case. Follow these steps to connect to your deployment from your app:
- Login to the ScaleGrid console.
- Go to your MySQL Cluster Details page.
- Find your Connection Strings on the Overview tab, and click on the See More link for the full list of programming interfaces and languages to connect through:
1: Obtain your JDBC connection string as explained in the above section. Let's say your connection string is is:
2: Download and save the ssl ca certificate as explained in the section
3: You will now need to add the ca certificate to java trusted keystore
On Linux based system execute the command: keytool -import -alias "MySQLCert" -file <path to your ca.pem> -keystore "/usr/java/default/jre/lib/security/cacerts" -noprompt -storepass "changeit" On Windows system execute the command in the administrator mode: <path to the jdk>/bin/keytool.exe -import -alias 'MySQLCert' -file <path of ca.pem file> -keystore "<path to the jdk>\jre\lib\security\cacerts" -noprompt -storepass "changeit"
You will now be all set to connect to your ssl enabled MySQL deployment using JDBC
JDBC connection without CA cert verification
You can turn off the SSL CA cert validation in your JDBC connection string as below. In such a case you do not need to download the ca certificate and add it to the trusted keystore
Updated 6 months ago