Cant connect postgres database to strapi app;ication

I have kept following as env, and still getting error while running my strapi application

error: database ││ “strapi-ecomm” does not ││ exist
Documentation

DATABASE_CLIENT=postgres
DATABASE_HOST=dpg-cmqc7721hbls73fiodng-a.singapore-postgres.render.com
DATABASE_PORT=5432
DATABASE_NAME=strapi-ecomm
DATABASE_USERNAME=strapi_ecomm_user
DATABASE_PASSWORD=XXX
DATABASE_SSL=true

Even if i disable SSL I’m getting error and getting the same error

Screenshot from 2024-03-08 09-36-53

Hi there,

That’s not much information to be going on here - but the error definitely stems from the line

DATABASE_NAME=strapi-ecomm

You have it there, so if that’s the code side, what does the DB side look like? Does that match the name of the database exactly? I’m suspicious that the username uses underscores but the database name uses a -, so that’s where I’d start first,

Regards,

John B
Render Support, UTC :uk:

Hi Rectified DATABASE_NAME, still getting error

error: SSL/TLS required

If you’re connecting externally to a database, then you need to specify sslmode=require in the connection string or the properties of the connection,

Regards,

John B
Render Support, UTC :uk:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.