2017-02-13 32 views
1

我刚刚安装了pgAdmin-4,并尝试连接到与其一起安装的默认服务器(PostgreSQL 9.5)。它要求输入密码(我假设默认情况下它的“Postgres的”),但是,我不断收到以下消息:无法连接到pgAdmin的默认服务器4

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?

我的工作在Windows 7

任何想法如何解决这个问题?

回答

0

第一件事是从问题中删除pgadmin。尝试使用psql连接命令行 - 如果您收到相同的消息,则说明问题不在pgadmin中。如果问题继续使用psql,那么可能您的postgresql配置不完整。该问题可能在文件pg_hba.conf中 - 该文件控制谁可以连接到后端。您也可以使用适当的Windows实用程序检查服务器应用程序是否正在运行。