Different PG user for DB creation


I’m testing Hanami 2 and I ran into an issue when creating DB. My PG user is different from my system user and the createdb command returns an error that there is no such user in PG. Can’t I specify this somewhere?


I think it’s a pure postgres question, but you should be able to setup an owner of the db you create using the --owner flag.

Let me know if that answers the question.
For the db settings inside of the hanami app, you just need the URL to your database which can contain user and password specified:


Source: What is the format for the PostgreSQL connection string / URL? - Stack Overflow