Skip to content

Instantly share code, notes, and snippets.

@samuelololol
Created September 5, 2013 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelololol/6453717 to your computer and use it in GitHub Desktop.
Save samuelololol/6453717 to your computer and use it in GitHub Desktop.
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