Login

Language :
TitleMySQL Time Zone 설정
MySQL Time Zone setting
Writer이지섭Write DateNov 13 2018Modify DateApr 14 2019View Count1907

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://ggamu.com/81

  http://dogcowking.tistory.com/179

 

Comment

Name               Password 
Content
Check Password.

Please enter your password when registering your comment.