본문 바로가기
Computer/Server

[AWS] MySQL Timezone Setup

by 생각하는달팽이 2015. 12. 23.

Hello?

Follow below steps.


1. Create Amazon Instance

2. Install Mysql(Maria DB) 



In here. /usr/share/zoneinfo  There are timezone info.


Now, We create Timezone Data in MySQL.


1. shell > mysql -uroot -p 


 mysql > SELECT NOW();


It show to u what timezone u following now.



Ok. Now Start Setup Timezone.

Shell > mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

Finalliy.


mysql > Set time_zone = 'Asia/Seoul'; ( Which u want )

mysql> SET GLOBAL time_zone = 'Asia/Seoul'; ( Which u want )



After that


mysql > SELECT NOW();


Correctly Time Appear !



Thanks.

반응형