whynot-here / whynot-here-api-server

whynot-here 서비스 API 서버
3 stars 0 forks source link

MySQL 서버 시간 변경 #94

Closed osj3474 closed 2 years ago

osj3474 commented 2 years ago

1) DB 서버

vim /etc/mysql/mysql.conf.d/mysqld.cnf
default-time-zone='+9:00'
service mysql restart

2) API 서버

sudo timedatectl set-timezone Asia/Seoul
osj3474 commented 2 years ago

JPA와 MySQL 싱크 안 맞을때 DataSource 설정에 &serverTimezone=Asia/Seoul 로 해둬야 스프링이나 서버에서 한국시간이더라도 mysql 들어갈때 한국시간 됨