2
Я добавил эту линию default_time_zone='+00:00'
в /etc/my.cnf, но я получаю сообщение об ошибке при перезагрузке сервер:Как установить часовой пояс сервера MySQL в UTC?
error: Found option without preceding group in config file: /etc/my.cnf
UPDATE
# 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
, пожалуйста, разместите соответствующий раздел своего cnf , Похоже, что вы mssing [] группа –
эта строка должна быть вставлена в определенную «секцию» ?? например, [mysql] ?? –
Я отправил ответ, да, это не часть группы, следовательно, ошибка, переместите ее вниз под [mysqld] и измените подчеркивания на тире (по умолчанию - зона времени вместо default_time_zone) –