How to fix: mysql: [ERROR] Found option without preceding group in config file /etc/mysql/my.cnf?

All options in your my.cnf need to be within a "group" like:

[mysqld]
bind-address 127.0.0.1

The group in this example is "mysqld". The group is named by a line preceding the options, and the name of the group is in square brackets.

Your file doesn't have any group identifier named before you start giving options.

Read https://dev.mysql.com/doc/refman/5.7/en/option-files.html for more details on how to format MySQL option files.

Tags:

Mysql