MySQL my.cnf file - Found option without preceding group
Missing config header
Just add [mysqld]
as first line in the /etc/mysql/my.cnf
file.
Example
[mysqld]
default-time-zone = "+08:00"
Afterwards, remember to restart your MySQL Service.
sudo mysqld stop
sudo mysqld start
Charset encoding
Check the charset encoding of the file. Make sure that it is in ASCII.
Use the od
command to see if there is a UTF-8 BOM at the beginning, for example.