作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已将此行 default_time_zone='+00:00'
添加到 /etc/my.cnf 中,但在重新启动服务器时出现此错误消息:
error: Found option without preceding group in config file: /etc/my.cnf
更新
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
default_time_zone = "+00:00"
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
最佳答案
将它从 default_time_zone 更改为 default-time-zone=
并将其放在 cnf 的 [mysqld]
部分
关于mysql - 如何将 MySQL 服务器时区设置为 UTC?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23570570/
我是一名优秀的程序员,十分优秀!