Title | MySQL Time Zone 설정 MySQL Time Zone setting | ||||||
Writer | 이지섭 | Write Date | Nov 13 2018 | Modify Date | Apr 14 2019 | View Count | 2785 |
1) input zone information. from shell execute below command, to insert system time zone information. mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p input password then zone information inserted. mysql is the database selection.
2) Apply to MySQL configuration cd /etc/mysql/mysql.conf.d vi mysqld.cnf [mysqld] default-time-zone = 'Asia/Seoul'
3) restart MySQL and check zone information mysql> SELECT @@global.time_zone, @@session.time_zone; +--------------------+---------------------+ | @@global.time_zone | @@session.time_zone | +--------------------+---------------------+ | Asia/Seoul | Asia/Seoul | +--------------------+---------------------+
[Web page referenced] http://dogcowking.tistory.com/179
| |||||||