我已经从postgres版本9.1升级到postgres 9.6,当我尝试连接到服务器上的数据库时,我收到以下错误:
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
当我运行pg_clusters时,它会显示:
9.6 main 5432 online postgres /var/lib/postgresql/9.6/main /var/log/postgresql/postgresql-9.6-main.log
当我查看/etc/postgresql/9.6/main/postgresql.conf
时,它最初显示:
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5433 # (change requires restart)
max_connections = 100 # (change requires restart)
但我现在已将端口更改为5432但这似乎没有解决问题。我需要采取另一个步骤吗?
由于