10 months ago
I successfully deploy a postgres with POSTGRES_DB and POSTGRES_USER by default as railway
And I try to connect and I can connect
!
I add 2 shared variables and added with my instance of Postgres to change with my custom name as customname:
POSTGRES_DB = customname
POSTGRES_USER = customname
Then I redeploy successfully and now I can't connect to my db.
When I click to Postgres > Data > Database connection is still waiting..
How can I set my custom POSTGRES_DB and POSTGRES_USER ?
4 Replies
10 months ago
Hello,
Those variables will not change the database name or database user, they are only used by Postgres upon a fresh deploy to initialize the first database and first user, after that they are purely informative.
If you want to change the username and or database name you would need to run the applicable SQL queries to do that, then you can change the variables.
Best,
Brody
Status changed to Awaiting User Response Railway • 10 months ago
10 months ago
Hello,
If I detroy my database and recreate it with the right POSTGRES_DB and POSTGRES_USER before it deploy, is it working ?
I have not the time to add the shared variable when I create a postgre database and I can't cancel the first deploy.
Status changed to Awaiting Railway Response Railway • 10 months ago
10 months ago
We do not support modifying those variables before deploy.
We recommend that they do not be changed as you could lock yourself out.
Status changed to Awaiting User Response Railway • 10 months ago
7 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 7 months ago