J.Y.S
¿ whats my interest ?
J.Y.S
전체 방문자
오늘
어제
  • 분류 전체보기 (59)
    • 트러블슈팅 기록 (7)
    • Java&Kotlin (5)
    • Server (22)
    • 데이터 엔지니어링 (3)
    • Architecture& Design Patter.. (1)
    • Daily (11)
    • 알고리즘 공부 (9)

블로그 메뉴

  • 홈
  • 태그

공지사항

인기 글

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
J.Y.S

¿ whats my interest ?

MySQL 서버 타임존 설정
Server

MySQL 서버 타임존 설정

2021. 1. 22. 06:40

서버 타임존을 설정하지 않아 다음과 같은 오류가 발생했다.

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 DB 타임존을 확인해봤더니,

SELECT @@global.time_zone, @@session.time_zone;

타임존 설정이 안되어 있다.

DB 에 글로벌하게 설정하거나, 프로젝트의 URL 에 설정하는 방법이 있다. 나는 프로젝트에서 mysql 과 연결하는 URL 에 추가하였다.

?serverTimezone=UTC

#datasource
spring.datasource.hikari.jdbc-url=jdbc:mysql://localhost:3306/arcus-board?serverTimezone=UTC

해결 끄읕.

 

+) time zone 을 UTC+9 (KST)으로 설정하고자 한다면 ?serverTimezone=Asia/Seoul 을 붙이면 된다고 한다.

 

 

저작자표시 (새창열림)

'Server' 카테고리의 다른 글

netlink (7) : kernel - user space 간 IPC 통신  (0) 2021.05.15
node.js 시작하기 (codeanywhere / express)  (0) 2021.02.02
[RESTful] REST API 활용하기 (2) - spring-boot 게시판에 적용  (0) 2021.01.21
[RESTful] REST API 활용하기 (1) - 개념  (0) 2021.01.18
VRF (Virtual Routing Forwarding) 이란  (0) 2021.01.09
    'Server' 카테고리의 다른 글
    • netlink (7) : kernel - user space 간 IPC 통신
    • node.js 시작하기 (codeanywhere / express)
    • [RESTful] REST API 활용하기 (2) - spring-boot 게시판에 적용
    • [RESTful] REST API 활용하기 (1) - 개념
    J.Y.S
    J.Y.S

    티스토리툴바