Q:

Can't connect to db in Play, connection string in application.conf

I can't connect to db using this code in application.conf:
db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgres:my_db123_dev"
db.default.user=my_user
db.default.password=123

The error: play.api.Configuration$$anon$1: Configuration error[Cannot connect to database [default]]
I'm not specifying localhost in there because it should be it by default.

A:

I believe it should be postgresql, not postgres in your db.default.url.
Also, while the stuff below might not matter completely, it's good best practice:

Change db.default.url to jdbc:postgresql://localhost/my_db123_dev (having localhost there is always good).
Put quotes around your username and password, because it's good form.

