原文:解決createdb: could not connect to database postgres: FATAL: Peer authentication failed for user "postgres"

操作系統: Ubuntu 運行下面的命令創建名為mydb的數據庫 得到一個錯誤:psql: FATAL: role terry does not exist, terry是我的機器名, 在postgresql數據庫中沒有名為terry的role, 所以會報出這個錯誤, 只要加上 U參數來指定一個存在的role就可以了,所以我將上面的命令改為: 又得到一個錯誤:psql: FATAL: Peer a ...

2012-11-30 16:41 0 20382 推薦指數:

查看詳情

運維筆記 -- psql: FATAL: database "postgres" does not exist (postgres用戶)

服務器終端,以postgres用戶操作數據庫,異常: 處理方式: 方式一:psql終端執行:(這里是指:用類似Navicat工具連接執行,或者以psql template1臨時用戶連接) 然后執行如下命令。 方式二:用知道的用戶進入數據庫【這里以搭建odoo ...

Fri Apr 24 03:38:00 CST 2020 0 3128
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM