본문 바로가기

개발/Spring

[SpringBoot] MySQL 연결 에러

 

test db를 연결하려고 하는데 갑자기 연결 에러가 발생했다.

분명 잘 됐었는데.. 그래서 운영 db를 연결하려 하는데 그것도 에러가 발생

 

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

 

맨 아래 뜨는 에러 메시지가 이러했다.

 

서버에 배포한 건 잘 돌아가는데 왜 로컬에서 붙였을 때만 에러가 나는지 모르겠던 차에 글을 발견했다.

바로 전에 서버에 ssl 관련 설정을 했었는데 그것 때문에 ssl 인증 관련 오류가 나는 것 같다.

 

db url에 useSSL=false를 추가했더니 연결이 잘 됐다.

 

jdbc:mysql://<ip>:3306/db?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Seoul&useSSL=false

 

 

 

참고

https://oops4u.tistory.com/2583