Skip to content

Instantly share code, notes, and snippets.

@RR-Helpdesk
Last active June 10, 2023 12:14
Show Gist options
  • Save RR-Helpdesk/0c1173b0ab84d36b6f0432874764be22 to your computer and use it in GitHub Desktop.
Save RR-Helpdesk/0c1173b0ab84d36b6f0432874764be22 to your computer and use it in GitHub Desktop.
Postgres SQL Statements #postgres
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