Blogger Information
Blog 100
fans 8
comment 2
visits 150699
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Mysql设置默认时区
lilove的博客
Original
2502 people have browsed it

Mysql设置默认时区:

        数据库创建后,默认的时区比东八区少了8个小时。

        如果sql语句中使用到mysql的时间会比正常时间少8个小时,需要修改mysql的系统时区。

使用mysql连接工具或者命令行工具都可以。

分别输入命令:

select now();     /*查看mysql系统时间*/
set global time_zone = '+8:00';    /*设置时区更改为东八区*/
flush privileges;     /*刷新权限*/

然后退出重新登录,显示当前时间和我现在的时间一致了。


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post