Q:

Unable to run Play Framework 1.2.4 application using ClearDB on heroku

here is the ClearDB url given by heroku, which I have placed in my application.conf:
mysql://ce321a40b79906:ad8a252e@us-cdbr-east.cleardb.com/heroku_171088b609e621d?reconnect=true

This doesn't work ! The log show following exception:
    ←[36m2012-05-03T15:45:52+00:00 app[web.1]:←[0m Caused by: com.mysql.jdbc.excepti
    ons.jdbc4.MySQLSyntaxErrorException: Table 'heroku_171088b609e621d.user' doesn't exist

Where as when I use Postgres using following configuration, it works perfectly fine:
db=postgres://xfqolvejdz:nRofWB6Lg1V9JDadmjfW@ec2-50-19-226-184.compute-1.amazonaws.com/xfqolvejdz
jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
jpa.ddl=update

What am I missing here ?

A:

The best way is to use the environment variables instead of copy and pasting URLs.  For Postgres the lines in the conf/application.conf are:
%prod.db=${DATABASE_URL}
%prod.jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
%prod.jpa.ddl=update

For ClearDB the following should work:
%prod.db=${CLEARDB_DATABASE_URL}
%prod.jpa.dialect=org.hibernate.dialect.MySQLDialect
%prod.jpa.ddl=update

