MySQL: setting time_zone in my.cnf options file

后端 未结 6 2130
遥遥无期
遥遥无期 2020-12-17 15:03

In MySQL you can set a session variable called time_zone to change the timezone. This is useful e.g. when looking at timestamps from another country. Here i

6条回答
  •  被撕碎了的回忆
    2020-12-17 15:17

    Edit the following:

    nano /etc/mysql/conf.d/mysql.cnf && systemctl restart mysql ; systemctl status mysql
    

    MySQL.cnf:

    [mysql]
    default_time_zone=America/Vancouver
    

    See here for current Time Zone formats --> https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

提交回复
热议问题