R
Railway10mo ago
Garcia

Database postgres bugged

Hi, i change the password from my database postgres, and now he dont connect more, using pgadmin he connect, but using dbeaver and system or psql from terminal, dont access. Help.
Solution:
you would need to run this on the database to change the password
ALTER USER postgres PASSWORD 'new-password';
ALTER USER postgres PASSWORD 'new-password';
after the password has been changed you can then update the databases' POSTGRES_PASSWORD variable for ease of use....
Jump to solution
6 Replies
Percy
Percy10mo ago
Project ID: N/A
Brody
Brody10mo ago
the password environment variable is single set, changing it wouldn't change the password, please use the original password to log in then change the password with a query
Garcia
GarciaOP10mo ago
what? if i need change the password, whats i make?
Solution
Brody
Brody10mo ago
you would need to run this on the database to change the password
ALTER USER postgres PASSWORD 'new-password';
ALTER USER postgres PASSWORD 'new-password';
after the password has been changed you can then update the databases' POSTGRES_PASSWORD variable for ease of use.
Garcia
GarciaOP10mo ago
ok thanks
Brody
Brody10mo ago
you can view the old password in the activity tab
Want results from more Discord servers?
Add your server