mysql如何修改时区为东八区区时,北京时间
作者:高景洋 日期:2023-03-21 10:05:47 浏览次数:620
如何修改mysql 时区为东八区?并将时间设置为北京时间
1、首先查看MySQL当前的时间
> select curtime();
> show variables like “%time_zone%”;
time_zone说明mysql使用system的时区,system_time_zone说明system使用CST时区
2、进行修改
> set global time_zone = ‘+8:00’; (修改mysql全局时区为北京时间,也就是我们所在的东8区)
> set time_zone = ‘+8:00’; (修改当前会话时区)
> flush privileges; (立马生效)
本文永久性链接:
<a href="http://r4.com.cn/art227.aspx">mysql如何修改时区为东八区区时,北京时间</a>
<a href="http://r4.com.cn/art227.aspx">mysql如何修改时区为东八区区时,北京时间</a>
相关文章
- mysql查看设置当前最大链接数
- linux centos如何修改mysql root用户密码
- centos 查看修改mysql端口号
- mysql如何修改时区为东八区区时,北京时间
- MySQL错误:ERROR 1175: You are using safe update mode 解决方法
- 连接mysql时提示 is not allowed to connect to this mysql
- linux centos7 mysql 防火墙开放3306端口
- linux centos7安装mysql教程
- 安装mysql报错:repository are already installed but they are not correct for this package.
- mysql错误 IP address 'xxxx' could not be resolved: Name or service not known
当前header:Host: r4.com.cn
X-Host1: r4.com.cn
X-Host2: r4.com.cn
X-Host3: 127.0.0.1:8080
X-Forwarded-For: 44.220.184.63
X-Real-Ip: 44.220.184.63
X-Domain: r4.com.cn
X-Request: GET /art227.aspx HTTP/1.1
X-Request-Uri: /art227.aspx
Connection: close
User-Agent: CCBot/2.0 (https://commoncrawl.org/faq/)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
If-Modified-Since: Sun, 26 May 2024 08:35:31 GMT
Accept-Encoding: br,gzip