#1 By: chris690, November 9th, 2013 14:49
I'm following the instructions here for connecting my Play app to an AWS RDS MySQL instance. The URL requires a jdbc type of "mysql2" and the problem is Hibernate complains with "No datasource configured" and I suspect this is because "mysql2" is not a known Hibernate dialect.
What's the solution?
#2 By: james143, November 9th, 2013 16:13
Yeah, I think you are right that Play and/or Hibernate doesn't like the "mysql2" prefix. So you might just have to manually set the DATABASE_URL (or another config param) in a form that works for them.
#3 By: chris690, November 10th, 2013 11:16
So I guess the alternative is to go with the standard "mysql" protocol and follow these instructions to add the public key to the java TrustStore and then add useSSL=true to the URL. My question is how to ad the public key to a trust store that can be used by Play (v1.2.7) on Heroku?
#4 By: chris690, November 10th, 2013 19:34
I ended up using the following URL:
And running the following command on the database:
GRANT USAGE ON *.* TO 'encrypted_user'@'%' REQUIRE SSL
And it's all working
I believe "verifyServerCertificate=false" is ok in this circumstance as AWS makes this point here:
The SSL support in Amazon RDS is strictly for encrypting the connection between your client and your DB instance; it should not be relied on for authenticating the server.
#5 By: chris690, November 11th, 2013 03:03
Forgot to mention that I had to customise play.db.DBPlugin to support adding those SSL driver parameters as Play v1.2.7 didn't have proper support for that with "db" config paramter, see https://github.com/playframework/play1/pull/686