浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

How to Change the MySQL Time Zone on an Ubuntu Server

If you wish to explicitly set the time zone for your MySQL running on an Ubuntu Server, here is how to do it.

First open your global MySQL my.cnf configuration file:

sudo nano /etc/mysql/my.cnf

Scroll down the file to location the [mysqld_safe] section. Add the following line:

timezone = GMT

Obviously you would set it to what you wanted to use, be it UTC, GMT+2 or whatever. Save your changes and restart MySQL:

sudo service mysql restart

Done.

posted on 2012-05-19 15:49  lexus  阅读(361)  评论(0编辑  收藏  举报