I'm trying to put the log_bin_trust_function_creators=1 parameter into the my.cnf configuration file to set the variable correctly on startup on a machine with Ubuntu 20.04 LTS. But every time I save the file with this line written in the config file, when I try to access the db I can't log in and iIhave this error output message:

mysql: [ERROR] Found option without preceding group in config file /etc/mysql/my.cnf at line 23.
mysql: [ERROR] Fatal error in defaults handling. Program aborted!

When I use SET GLOBAL log_bin_trust_function_creators=1; the parameter and the db work fine, but I would prefer to not having to reboot the machine when I set this parameter.

The version that we're using is mysql Ver 8.0.20-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

Can someone help me with this problem?

2 Answers 2


Put it under mysqld, there it should be found and set

log-bin-trust-function-creators = 1
  • This is the most common mistake people make when options are not under the correct group header. +1 !!! Commented Jun 23, 2020 at 19:17
  • Hi, i've tried to do what you advice me but i can't find anything that contains mysqld
    – Tommaso
    Commented Jun 25, 2020 at 15:54
  • search for [mysqld] in a text editor and if it finds nothing add the two lines but you should have port bind-adress and much more in that section
    – nbk
    Commented Jun 25, 2020 at 16:03

Ubuntu uses a split config file. The [mysqld] section you need to add this to is found in /etc/mysql/mysql.conf/mysqld.cnf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.