【问题标题】:Error connection to server: FATAL: role 'postgres' does not exist与服务器的连接错误:致命:角色“postgres”不存在
【发布时间】:2017-05-24 10:11:48
【问题描述】:

我在使用 pgAdmin3 连接 postgres 数据库时发现了该错误。我以为postgres 用户名丢失了,但我在终端中尝试了psql -l 然后我发现postgres 用户名仍然存在。

                         List of databases
   Name    | Owner | Encoding | Collate | Ctype | Access privileges 
-----------+-------+----------+---------+-------+-------------------
 postgres  | user  | UTF8     | C       | UTF-8 | 
 template0 | user  | UTF8     | C       | UTF-8 | =c/user          +
           |       |          |         |       | user=CTc/user
 template1 | user  | UTF8     | C       | UTF-8 | =c/user          +
           |       |          |         |       | user=CTc/user
(3 rows)

请告诉我如何恢复postgres 问题。谢谢。

【问题讨论】:

    标签: node.js postgresql pgadmin


    【解决方案1】:

    psql -l 列出数据库,而不是用户

    psql \du 确实列出了用户

    这里有一个元命令列表供参考:

    https://www.postgresql.org/docs/current/static/app-psql.html#APP-PSQL-META-COMMANDS

    【讨论】:

      猜你喜欢
      • 2021-01-07
      • 2017-12-20
      • 1970-01-01
      • 1970-01-01
      • 2023-01-26
      • 2019-12-29
      • 2013-02-24
      相关资源
      最近更新 更多