我刚刚安装了pgAdmin-4,并尝试连接到与它一起安装的默认服务器(PostgreSQL 9.5)。它要求输入密码(我假设默认密码是"postgres"),但是,我一直收到以下消息:
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?
我在Windows7上工作。
对如何解决这个问题有什么想法吗?
发布于 2017-02-13 18:08:49
第一件事是从问题中删除pgadmin。尝试使用psql通过命令行进行连接-如果您收到相同的消息,您就知道问题不在pgadmin。如果psql的问题仍然存在,那么可能是postgresql的配置没有完成。问题可能在文件pg_hba.conf中-此文件控制允许谁连接到后端。您还可以使用适当的Windows实用程序检查服务器应用程序是否正在运行。
https://stackoverflow.com/questions/42198276
复制相似问题