I’m trying to use a custom user name to setup pris...
# orm-help
i
I’m trying to use a custom user name to setup prisma1. If I use postgres as the username, the prisma docker container connects with the postgres docker container and all goes well and the prisma database is created. But as soon as I try to use another username as the database user in postgres and in the user field of the prisma config it fails to create the prisma database with the following error: Exception in thread “main” org.postgresql.util.PSQLException: ERROR: permission denied for database prisma Any ideas?
r
Hey @inlightmedia 👋 Have you given permissions to the other username to access the database? If not, you would need to grant permissions first and then try again. Also are you getting started with Prisma 1 or setting up an existing project?
i
The problem was that I was using docker secrets for the postgres container’s database username (i.e. POSTGRES_USER_FILE=/var/run/secrets/my-postgres-username) and for some reason the postgres docker hub container does not play well with the username being a docker secret (though passwords work great). I’ve yet to figure out why but using a docker secrets file path in the environment variable as stated in the docs prevents the username from being defined in postgres. All that to say it was not a Prisma issue.
💯 1