Last active
June 10, 2023 12:14
-
-
Save RR-Helpdesk/0c1173b0ab84d36b6f0432874764be22 to your computer and use it in GitHub Desktop.
Postgres SQL Statements #postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHOW password_encryption; | |
SELECT rolpassword from pg_authid where rolname = '{your-db-user-name}'; | |
ALTER USER "{your-db-user-name}" with password '{your-new-db-password}'; | |
SET password_encryption = 'scram-sha-256'; | |
SET password_encryption = 'md6'; | |
SHOW password_encryption; | |
SELECT * FROM pg_hba_file_rules(); | |
SELECT pg_reload_conf(); | |
-- to verify the settings are like you want: | |
SHOW password_encryption; | |
SELECT * FROM pg_hba_file_rules(); | |
-- change the password | |
\password myuser | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment