[英]psql: FATAL: password authentication failed for user "postgres" postgresql version 10
[英]psql: FATAL: password authentication failed for user “postgres”
我正在使用Windows 10並剛剛安裝了PostgreSQL 10.4。 現在,我的超級用戶是postgres,我必須創建一個新用戶。 我在cmd上使用了以下命令:
psql -U postgres -c "CREATE ROLE gautam LOGIN NOSUPERUSER INHERIT CREATEDB CREATEROLE;" mydb
錯誤是
C:\\Users\\Gautam Jajoo>psql -U postgres psql: FATAL: password authentication failed for user "postgres" password retrieved from file "C:\\Users\\Gautam Jajoo\\AppData\\Roaming/postgresql/pgpass.conf"
誰能告訴它可能的解決方案!
添加-W參數以提示輸入密碼
psql -U postgres -c -W "CREATE ROLE gautam LOGIN NOSUPERUSER INHERIT CREATEDB CREATEROLE;"
您可以使用http://cmder.net在Windows中使用cmd
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.