小编Bar*_*rim的帖子

psql 不会列出数据库

我有一种情况让我摸不着头脑,但我是 postgresql 的新手,所以我可能会忽略一些明显的东西。

我设置了一个测试台服务器并在 pg_hba.conf 中设置了访问权限:

local   all             postgres                                peer
local   all             all                                     md5
host    all             all             127.0.0.1/32            trust
host    all             all             ::1/128                 md5
Run Code Online (Sandbox Code Playgroud)

然后重新启动 postgresql 服务器,之后,作为我的普通用户,我可以使用

psql -h localhost -U postgres -l
Run Code Online (Sandbox Code Playgroud)

这给了我表格列表。

在第二个系统上 pg_hba.conf 匹配其他文件。我重新启动了数据库服务器进程,但是 psql -h localhost -U postgres -l 因为我的用户产生了这个错误:

2012-03-29 23:31:17 UTC LOG:  could not receive data from client: Connection reset by peer
Password for user postgres: 
psql: fe_sendauth: no password supplied
2012-03-29 23:31:29 UTC LOG:  could not receive data from client: Connection reset by …
Run Code Online (Sandbox Code Playgroud)

postgresql psql

4
推荐指数
1
解决办法
2058
查看次数

标签 统计

postgresql ×1

psql ×1