消息关闭
    暂无新消息!

MYSQL 如何修改时区

问题作者 : 韦小宝2017-07-26发布
show variables like "%time_zone%";
VARIABLE_NAME                                                    VARIABLE_VALUE                                                                                                             system_time_zone                                                 UTC                                                                                                                                           time_zone                                                        SYSTEM 

如何将UTC修改为CST?

3个回答

︿ 1
-- 更改全局的(已经连接的 session 不受影响)
 set global time_zone='+01:00';
-- 设置当前连接的
set session time_zone='+01:00';

如果是永久性的修改,在配置文件中加入:  time_zone='+01:00'