mirror of
https://git.adityakumar.xyz/blog.git
synced 2024-11-13 20:39:43 +00:00
1.5 KiB
1.5 KiB
title | date | lastmod | draft | keywords | description | tags | categories | author | comment | toc | autoCollapseToc | postMetaInFooter | hiddenFromHomePage | contentCopyright | reward | mathjax | mathjaxEnableSingleDollar | mathjaxEnableAutoNumber | hideHeaderAndFooter | flowchartDiagrams | sequenceDiagrams | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
psql: FATAL: Peer authentication failed for user | 2023-01-04T08:47:34+05:30 | 2023-01-04T08:47:34+05:30 | false |
|
|
|
false | false | false | true | false | false | false | false | false | false | false |
|
|
The order of rules in pg_hba.conf
matters.
Trying to connect to postgresql database with a standard user fails with psql: FATAL: Peer authentication failed fr user "user1"
.
The second line of pg_hba.conf
makes your connection attempt fail:
local all all peer
The order of rules matter. If the first one that matches the access method, username, database name and source IP range fails, there will be no second attempt. So either remove this line, your place your rule above this one.