MySQL修改数据库时区
程序员文章站
2022-03-07 22:13:43
mysql> flush privileges; ......
--查看数据库时区设置
mysql> 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;
上一篇: Centos 7 Samba服务安装
下一篇: MySQL-基础操作之增删改查