2013-08-29 73 views
0

每當我嘗試運行「的psql」我receieve以下錯誤信息:無法運行PSQL

[email protected]:~$ psql 
psql: FATAL: role "ahcarpenter" does not exist 

關於如何解決此問題的任何想法?

+0

參見[PostgreSQL的錯誤:致命:角色「用戶名」不存在(http://stackoverflow.com/questions/11919391/ postgresql錯誤致命角色用戶名不存在) –

回答

1

這是因爲

$ psql 

相當於

$ psql ahcarpenter -U ahcarpenter 

由於該用戶不存在,輸入用戶postgres

$ psql -U postgres 

一旦進入創建用戶和數據庫「 ahcarpenter」。

create user ahcarpenter; 
create database ahcarpenter with owner ahcarpenter; 

出口

\q 

重新輸入

$ psql 
+1

所以在嘗試'psql -U postgres'後,我得到以下內容:'psql:FATAL:對於用戶「postgres」,對等認證失敗。 – Drew

+0

@德魯 - 考慮到您的其他問題,您將不得不坐下一個小時左右,至少瀏覽手冊和教程。除非您對所使用的某些術語至少有基本的瞭解,否則您無法取得任何進展。 –

+0

@RichardHuxton你有沒有機會知道如何解決我上面寫的錯誤? – Drew