티스토리 뷰
데이터베이스(Database)
[Database(데이터베이스)/postgreSQL] 외부 허용하기 / no pg_hba.conf entry database SSL off error 오류 해결하기
개발자 고포고 2021. 11. 17. 23:46반응형
[Database(데이터베이스)/postgreSQL] 외부 허용하기 / 외부에서 DB 접근 가능하게하기
기본적으로 postgreSQL는 localhost 수준에서 DB접근을 허용한다.
때문에 외부에서 접근을 하기위해서는 config파일을 수정해줘야한다.
pg_hba.conf 파일이 그 역할을 한다.
[위치]
C:\Program Files\PostgreSQL\(버전번호)\data\pg_hba.conf
C:\Program Files\PostgreSQL\14\data\pg_hba.conf - 14버전일경우
C:\Program Files\PostgreSQL\12\data\pg_hba.conf - 12버전일경우
기본위치는 그렇하고, 버전마다 data경로의 앞이 바뀔 수 있다.
[변경할 내용]
그림과 같이
host all all 0.0.0.0/0 scram-sha-256
다음과 같은 내용을 추가해주면 외부접속이 허용된다.
#postgresql #postgres #sql #외부허용 #pg_hba.conf # SSL off error #error #postgres window #postgres error
반응형
'데이터베이스(Database)' 카테고리의 다른 글
[mssql/databse] ssms(sql management studio) 접속 시 (local) / 127.0.0.1 /자신의 아이피로 접근하는 방법 (0) | 2021.12.17 |
---|---|
[datbase/sql] sql 기본 작성법(저장용) update/insert/delete/select (0) | 2021.12.13 |
댓글
반응형