a year ago
I have a postgres connected with provided variables and it even has a line connecting them but my build keeps failing saying it is not connected.
Error: P1000: Authentication failed against database server at postgres.railway.internal, the provided database credentials for postgres are not valid.
25 Replies
a year ago
ccac45e
a year ago
Where do I get my projectID if ccac45e is not it
a year ago
f3f5892b-9d96-42c0-adbe-b97efda2d11d
a year ago
Hello,
The data tab can connect to the database just fine, meaning everything on Railway is working correctly, so please make sure you are using the correct variable to connect to the database
a year ago
@Brody - Hi, I have the exact setup for staging and production with no issues. This is another branch with the exact same app variables. The only difference is the environment. I do not know why a singular environment would be failing with the error message that I need to connect the database when I am using Railway variables and it is showing as connected visually.
Error: P1000: Authentication failed against database server at postgres.railway.internal, the provided database credentials for postgres are not valid.
Please make sure to provide valid database credentials for the database server at postgres.railway.internal.


a year ago
I don't know how to change this to private so I can not share certain things with you but I have visually verified 3 times now that the connection string is the correct one. Also, I set it using Railways-provided variables, so there is 0 reason it should be telling me it does not have the credentials
a year ago
I'm sorry but I cannot find the service that these errors are coming from, please provide a direct link to the deployment in question
a year ago
a year ago
Looks like your database url variable was incorrect when that deployment was made, but it's since been corrected, can you please try another deployment.
a year ago
a year ago
Ah I see what happened, you swapped around the volumes so now your password for the database set via the service variables is not in sync with the password saved on the volume.
Do you happen to have the original password?
a year ago
No, I did not realize switching volumes would be an issue, as it was in the same environment. I needed to drop all the tables and start fresh so I thought that would be the easiest approach.
a year ago
Is there data in that database that you care about?
a year ago
nope - it is empty as it is just a test environment. I have a different ticket for an issue with the data on a different environment.. lol
a year ago
Then I would recommend wiping its volume so that Postgres can re-init itself with the correct password
a year ago
I thought that is what I did last time. Is there help documentation or are you able to just do it?
a year ago
You can do it from within the volume's settings, not something an admin has to do as it's just a simple button!
a year ago
ok.
"Delete Service
Deleting this service will permanently delete all its deployments and remove it from this environment. This cannot be undone."
a year ago
Not delete the service, go into the volume's settings and click the "Wipe" button
a year ago
No problem!
a year ago
That did it. Thank you. When you have a moment I could really use help with this as it is our production data...
https://station.railway.com/questions/need-data-from-manual-backup-394bc23f
a year ago
Okay, I'll solve this thread and we can continue the conversation on that thread
a year ago
!s
Status changed to Solved brody • 11 months ago