Can we change password of postgres user at sql safely


(Admir Hodzic) #1

Long time ago I did open port and allowed remotely SQL connections to my Disourse sql db.
Now I want to change password for db sql user postgres, but I do not know is that username related to app or any other parts of system.
Can we just call
ALTER USER "postgres" WITH PASSWORD 'new_password';
Or there is other way to do it.


(Matt Palmer) #2

postgres is the default “superuser” account; all our default templates auth to that account via local user trust, so you should be able to change or set a password on that account if you want. I don’t recommend it, because giving remote access to the database superuser is a bad idea, but if you want to, you can without causing Discourse any heartburn.


(Admir Hodzic) #3

I am trying to recover from it. By changing it.