BoostCource/Etc

[Error] DB config 오류

칸타탓 2018. 8. 2. 23:13

Caused by: java.sql.SQLException: The server time zone value 'KST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

 

 

이클립스 실행 시 위와 같은 문제가 발생하는 경우, mysql 연결하는 부분의 url 맨 뒤에 &serverTimezone=Asia/Seoul 붙여주기

(mysql 커넥터가 6버전 이상으로 올라가면 서버타임존을 설정하도록 되어있기 때문에 발생하는 문제이다.)

 

private String url = "jdbc:mysql://localhost:3306/connectdb?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul&useSSL=false";

 


 

 

ssl 오류가 난다면, useSSL=false 추가하여 해결할 수 있다.

private String url = "jdbc:mysql://localhost:3306/connectdb?useUnicode=true&characterEncoding=utf8&useSSL=false";

 

이와 같이 수정해 준다.