Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
丢失PostgreSQL 9.6密码_Postgresql_Postgresql 9.6 - Fatal编程技术网

丢失PostgreSQL 9.6密码

丢失PostgreSQL 9.6密码,postgresql,postgresql-9.6,Postgresql,Postgresql 9.6,我丢失了PostgreSQL的密码。我已经试过用谷歌搜索一下了,但是 local-all-trust 这个解决方案对我不起作用。有人知道如何以其他方式恢复/重置此密码吗?谢谢 编辑 以下是我收到的错误: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections

我丢失了PostgreSQL的密码。我已经试过用谷歌搜索一下了,但是

local-all-trust

这个解决方案对我不起作用。有人知道如何以其他方式恢复/重置此密码吗?谢谢

编辑

以下是我收到的错误:

could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

我确实尝试了此处发布的解决方案

我假设您指的是此处描述的过程:

实际上,所描述的过程有点错误,因为您不应该在注释行之后添加行“local all trust”,而是应该将所有方法从“md5”修改为“trust”。这样,我就可以连接到服务器,而无需指示密码,然后可以重置密码

在windows上,我不得不将行“hostall 127.0.0.1/32md5”更改为“hostall 127.0.0.1/32trust”


希望这能有所帮助

到底什么不起作用?。。错误?失败的
本地所有信任解决方案是什么?请说得更具体些。你是说你已经按照步骤做了吗?“连接被拒绝”意味着Postgres没有运行。这与错误的密码无关。我认为他正在尝试使用TCP/IP进行连接,但这个pg_hba.conf仅用于unix套接字连接。