MySQL修改时区

设置全局时区

mysql> set global time_zone = '+8:00';
Query OK, 0 rows affected (0.00 sec)

设置时区为东八区

mysql> set time_zone = '+8:00';
Query OK, 0 rows affected (0.00 sec)

刷新权限使设置生效

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

查看验证

mysql> show variables like '%time_zone%';
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| system_time_zone | |
| time_zone | +08:00 |
+------------------+--------+
2 rows in set, 1 warning (0.01 sec)

posted @ 2020-01-29 16:15  想看云飞却没风~  阅读(517)  评论(0编辑  收藏  举报