또, 억까 당해버린 상황
괴문자 오류 해결 후,
이제 작업 개시해보려 했는데
psql: error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061)
Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061)
Is the server running on that host and accepting TCP/IP connections?
이번엔 또 뭐야
localhost:5432가 없다는 이야긴 것 같다
잘 쓰고 있었는데 이건 또 무슨 말이지?
postgresql 서버 다시 가동 start!
pg_ctl -D "C:/Program Files/PostgreSQL/16/data" start
PostgreSQL은 확실하게 깔려있으니까
cmd에 이 명령어로 다시 서버를 가동시켜주면 된다.
오 가동됐다~ 하고 방심한 순간
server closed the connection unexpectedly before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
The connection to the server was lost. Attempting reset: Failed.
!?>
You are currently not connected to a database.
서버가 다시 가동은 됐지만, 문제는 프롬프트 창을 끄면 서버도 같이 꺼진다
server closed the connection unexpectedly before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
Could not send cancel request: PQcancel() -- connect() failed: error 10061
The connection to the server was lost. Attempting reset: Failed.
매번 작업할 때마다 cmd켜고 서버 실행시키는 이 과정.
이건 너무 귀찮잖아
어젠 안그랬잖아 왜 이렇게 된거야 너
분명히 어제는 잘 썼는데
net start postgresql도 안 되는 상황
net start postgresql 명령어로 다시 서버를 가동시키려 했는데,
(net start postgresql-x64-16도 해봤음)
pg_ctl: "C:/Program Files/PostgreSQL/16/data/postmaster.pid" PID 파일이 없습니다
서버가 실행 중입니까?
The reload command returned an error (1)
없다고 한다
하하 어이 없네
services.msc에도 없는 상황
그리고 services.msc도 하나하나 뒤져가면서 살펴봤는데
없다
뭐, 없으면 다시 만들면 되지~
정 안 되면 mysql도 있으니까 ㄱㅊ
새로운 postgresql-x64-16 연성 🔯
자, 이제 포스트그리 서버 소환식을 짜볼까
PostgreSQL 설치된 폴더에 pg_ctl 명령어가 있는데, 그걸 써서 수동으로 등록해줄거다
"C:\Program Files\PostgreSQL\16\bin\pg_ctl" register -N "postgresql-x64-16" -D "C:\Program Files\PostgreSQL\16\data"
이러고 나면?
services.msc 들어가서 잘 연성됐나 확인해보고
누르고 우클릭해서 실행 상태로 변경
참고로 실행 누를 때는 아까 일회용으로 켜놨던 postgresql 서버는 꺼줘야 한다
그럼 이걸로 해결이다~
요약&마무리
postgresql 서버를 가동하는 서비스가 완전히 사라져버려서 이용할 수 없었고,
아예 사라져버린 postgresql 서비스를 새로 만들어서 실행시켜줬다.
새로 만드는 명령어는 이거
"C:\Program Files\PostgreSQL\16\bin\pg_ctl" register -N "postgresql-x64-16" -D "C:\Program Files\PostgreSQL\16\data"
어제까지만 해도 잘 돌아가던 게 왜 없어졌는지는 모르겠다만
이젠 또 없어져도 해결할 수 있다구~
'Etc.' 카테고리의 다른 글
[도서 리뷰] <행동의 과학, 디자인의 힘> (0) | 2025.02.28 |
---|---|
[오류 해결] PostgreSQL 괴상한 문자로 메시지가 뜨는 괴빡치는 문제 (?묎렐 沅뚰븳 ?놁쓬) (0) | 2024.08.29 |
[오류 해결] 윈도우 10 블루투스 드라이버가 사라지는 문제 (9) | 2024.07.03 |
[정보처리기사] 응시 자격 서류 온라인 제출하기 (0) | 2024.03.02 |
[Bitcoin Core] 비트코인 코어(testnet) 설치 · 동기화 (Windows) (1) | 2023.10.08 |