MySQL时区参数
时间:2021-07-01 10:21:17
帮助过:67人阅读
[mysqld]
default-time-zone=‘+8:00‘
保存,退出
重启mysql 服务器
方法2:修改参数
mysql> set time_zone = ‘+8:00‘;
验证:
mysql> show variables like ‘%time_zone%‘;
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| system_time_zone | CST |
| time_zone | +08:00 |
+------------------+--------+
2 rows in set (0.00 sec)
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2011-18-21 18:39:07 |
+---------------------+
1 row in set (0.00 sec)
MySQL时区参数
标签:mysql时区参数 time_zone