RDB/PostgreSQL

psql: 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"?

개발자웅이 2023. 7. 24. 15:28

psql: 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 옵션으로 포트 지정을 해주지 않았을 경우 발생하는 에러입니다.

 

vi postgresql.conf 파일의 port부분을 참고하여

psql -p [PORT] 명령어 수행 시, 정상적으로 콘솔에 진입됩니다.

반응형