2012-12-26 449 views
1

我试图从命令行运行psql.exe。我收到如下错误。psql:无法连接到服务器:连接被拒绝(0x0000274D/10061)在Windows

C:\>cd C:\Program Files\PostgreSQL\8.3\bin 

C:\Program Files\PostgreSQL\8.3\bin>psql.exe 
psql: could not connect to server: Connection refused (0x0000274D/10061) 
     Is the server running on host "???" and accepting 
     TCP/IP connections on port 5432? 

任何人都可以帮助如何解决它。

在此先感谢。

回答

3

你需要为它提供一些参数:

C:\Program Files\PostgreSQL\8.3\bin> psql.exe -h localhost -U user -d database 
相关问题