Dropdb问题; “无法连接到template1 /连接被拒绝”

时间:2019-07-27 20:31:00

标签: postgresql

我只想通过Windows cmd中的命令删除db。 我检查了所有postgres服务是否正在运行。 我添加了一些明确的防火墙访问权限,但仍然出现错误。

C:\Program Files\PostgreSQL\11\bin>dropdb -h localhost -p 5333 -U postgres -w OC_A
dropdb: could not connect to database template1: could not connect to server: Connection refused (0x0000274D/10061)
        Is the server running on host "localhost" (::1) and accepting
        TCP/IP connections on port 5333?
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 5333?

我尝试过; 1-将localhost更改为127.0.0.1 / 0.0.0.0;都没有用 2-listen_addresses ='*'#要侦听的IP地址; 3-添加了防火墙规则

没有帮助

我已经安装了多个postgres版本,这会导致什么吗?

我想知道谁能帮助我解决这个简单的问题

0 个答案:

没有答案