溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

postgresql登錄失敗怎么辦

發(fā)布時(shí)間:2020-07-18 11:54:53 來源:億速云 閱讀:309 作者:清晨 欄目:編程語言

小編給大家分享一下postgresql登錄失敗怎么辦,相信大部分人都還不怎么了解,因此分享這邊文章給大家學(xué)習(xí),希望大家閱讀完這篇文章后大所收獲,下面讓我們一起去學(xué)習(xí)方法吧!

postgresql登錄失敗的解決方法:

確認(rèn)phpPgAdmin是否可以鏈接到postgresql數(shù)據(jù)庫,方法:查看data/pg_log下的log有沒有phpPgAdmin的訪問記錄,有則說明可以

鏈接。

查看postgresql的認(rèn)證方法:pg_hba.conf

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

看著好像跟ident認(rèn)證方式有點(diǎn)關(guān)系,最后在官方文檔找到一句話:

When using an external authentication system like Ident or GSSAPI, the name of the operating system 
user that 
initiated the connection might not be the same as the database user he needs to connect as.

明白了,原來上面的[local   all         all          ident]搞的鬼,如果是ident的話需要配置 pg_ident.conf文件,所以果斷換成除以上兩種

加密方式外的方法

重啟postgresql:

#service postgresql restart.

再訪問一次,成功。

以上是postgresql登錄失敗怎么辦的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI