본문 바로가기
IT 메모장/오류들 😤

psql: 치명적오류: 사용자 "postgres"의 password 인증을 실패했습니다

by 히민히 2021. 6. 10.

cmd에서 postgres 관련하여 데이터베이스 생성 배치파일 실행하려 하는데 자꾸

psql: 치명적오류: 사용자 "postgres"의 password 인증을 실패했습니다

오류 내뱉는다....

 

password도 바꿔보고 난리 쳐도 그대로임.

 

 

C:\Program Files\PostgreSQL\11\data

에 있는, 

 

pg_hba_conf 열어준다.

 

 

 

❗❗ postgres 사용자 연결 방식을 trust 로 하기 위해

md5 -> trust

로 변경해 주는 작업을 해준다.

 

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
host    all             all             0.0.0.0/0                 trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust

 

 

 

 

trust로 바꾼 후에 서비스 postgres 재시동 해주고, 모든 설치 끝난 후에는 다시 md5로 복귀해준다.

 

 

바꾸고 실행해보니 실제로 성공함.

 

 

 

C:\Program Files\PostgreSQL\postgres_install\actionlog>create_actionlog_db
Creating TIBCO Spotfire User Action Log database and user
Creating TIBCO Spotfire User Action Log tables
-----------------------------------------------------------------
Please review the log file (actionlog.txt) for any errors or warnings!

 

 

꼭 다시 md5로 복귀하고 서비스 재시동 해주어야함!

반응형

댓글