[트러블슈팅] psql: error: connection to server on socket "/tmp/.s.PGSQL.5432"
-
728x90
사이드 플젝에서 postgre를 사용하고 있기 때문에 오늘도 평소처럼 local로 접속을 시도했다
그러나...
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?
cd /opt/homebrew/var/postgresql
// 특정 버전에 맞춰 경로접근 (내 경우, 13 14 버전이 깔려 있어 경로가 달랐음!)
rm -f postmaster.pid
// pid 삭제
brew services start postgresql@14
// 특정 버전에 맞춰 재실행
psql postgres
// 실행 확인
위 대로 실행하기 위해 폴더를 찾고, 아까 설치한 14버전을 지웠다. 그 후 나머지 커멘드를 따라 하니 정상적으로 실행 되었다.