title: How to connect to a remote MySQL database via SSL using Play Framework?
body: <p>I deploy Play applications in distributed environments,  backed by a remote MySQL database. Specifically, the applications are hosted on heroku, and the database is on Amazon RDS (though this really applies to any remote database connection). Since the database isn't just on localhost, I'd prefer that the remote MySQL connection is made through SSL for security. </p>
  
  <p>Given a CA certificate to trust, how can I configure a Play application to connect to the MySQL server through SSL, only if the host certificate can be verified? </p>
  
  <p>Assume this as the current database configuration:</p>
  
  <pre><code>db.default.driver=com.mysql.jdbc.Driver
  db.default.url="jdbc:mysql://url.to.database/test_db"
  db.default.user=root 
  db.default.password="...."
  </code></pre>