본문 바로가기
[개발] 프로그래밍/Web, Spring, Java

[Spring Boot] 데이터베이스 연결 오류 (pgjdbc: autodetected server-encoding to be ISO-8859-1)

by 안산학생 2021. 6. 8.

★표시는 비공개 정보입니다.


오류내용

 

* What went wrong:
Execution failed for task ':dams-common:flywayBaseline'.
> Error occurred while executing flywayBaseline
  
  Unable to obtain connection from database (jdbc:postgresql://localhost:★/★) for user '★': ?����???��?��?: ??��??? "★"?? password ★?????? ��?����?����?��?��? (pgjdbc: autodetected server-encoding to be ISO-8859-1, if the message is not readable, please check database logs and/or host, port, dbname, user, password, pg_hba.conf)
  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  SQL State  : 28P01
  Error Code : 0
  Message    : ?����???��?��?: ??��??? "★"?? password ★?????? ��?����?����?��?��? (pgjdbc: autodetected server-encoding to be ISO-8859-1, if the message is not readable, please check database logs and/or host, port, dbname, user, password, pg_hba.conf)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org


발생 원인

 

오류가 발생한 이유는 DB User 정보를 잘못적었거나, User 정보가 없을 경우에 발생합니다.

 

기존에 user 정보가 있어 정상작동하다가 갑자기 위 오류가 발생하게 된다면, DB 업그레이드 혹은 업데이트가 의심됩니다. 저 또한 업그레이드 혹은 업데이트 이후 user 정보가 삭제되어 서버 실행 시 위 오류가 발생했습니다.


해결 방안

 

  1. JDBC 설정 시 user 정보가 정확하게 적혀있는지 확인
  2. 설정이 정상이라면, DB에 해당 user가 존재하는지 확인

 

댓글