본문 바로가기
잡동/Spring

java.sql.SQLException: The server time zone value '´???¹?±¹ ???ؽ?' is unrecognized or represents more than one time zone.

by 죠부니 2018. 10. 24.
반응형

MYSQL 버전을 바꾼후 커넥터를 연결후 해당에러 발생

java.sql.SQLException: The server time zone value '´???¹?±¹ ???ؽ?' 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.

Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '´???¹?±¹ ???ؽ?' 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-connector-java 버전이 5.1.X 이상의 경우 KST타임존을 인식하지 못하는 이슈가 존재한다.

: 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.


해결방법

커넥션 문구에 serverTimezone=UTC 를 추가한다.

example


jdbc:mysql://IP:PORT/DBNAME?autoReconnect=true&cacheServerConfiguration=true&elideSetAutoCommits=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC


&serverTimezone=UTC



반응형

'잡동 > Spring' 카테고리의 다른 글

Spring Mysql Blob 저장 및 출력  (0) 2018.11.02
Eclipse Console 로그출력 늘리기  (0) 2018.11.02
Unknown system variable 'query_cache_size'  (0) 2018.10.24
Tomcat설치  (0) 2018.08.10
https://spring.io/  (0) 2018.08.10