GIS开发 | 空间分析 | 软硬件技术

postgresql修改端口后无法通过psql连接psql: error: could not connect to server: No such file or directory

在修改postgrsql端口后,使用psql登陆postgrsql报错如下:

psql: error: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

解决办法:在psql后加端口号

psql -p 新端口号

image.png