Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PostgresQL TroubleShooting

Problem

  1. connect psql with local account(pgsql user) without parameter -h localhost : success
  2. connect psql with local account(pgsql user) with parameter -h localhost : fail

Workaround

  1. use Ident Server
  2. or edit pg_hba.conf, replace ident with md5
...
81 # IPv4 local connections:
82 #host    all             all             127.0.0.1/32            ident
83 host    all             all             127.0.0.1/32            md5
84 # IPv6 local connections:
85 #host    all             all             ::1/128                 ident
86 host    all             all             ::1/128                 md5
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.