当前位置:Gxlcms > 数据库问题 > MySQL修改数据库时区

MySQL修改数据库时区

时间:2021-07-01 10:21:17 帮助过:10人阅读

show variables like "%time_zone%"; +------------------+--------+ | Variable_name | Value | +------------------+--------+ | system_time_zone | UTC | | time_zone | SYSTEM | +------------------+--------+
--修改时区
mysql> set global time_zone = +8:00; Query OK, 0 rows affected (0.00 sec) mysql> show variables like "%time_zone%"; +------------------+--------+ | Variable_name | Value | +------------------+--------+ | system_time_zone | UTC | | time_zone | SYSTEM | +------------------+--------+
--修改时区
mysql> set time_zone = +8:00; Query OK, 0 rows affected (0.00 sec) mysql> show variables like "%time_zone%"; +------------------+--------+ | Variable_name | Value | +------------------+--------+ | system_time_zone | UTC | | time_zone | +08:00 | +------------------+--------+

  mysql> flush privileges;

 

MySQL修改数据库时区

标签:nbsp   pre   mys   时区   数据   font   code   variables   zone   

人气教程排行