1

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?

3

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

[mysqld]
log-bin-trust-function-creators = 1
3
  • This is the most common mistake people make when options are not under the correct group header. +1 !!! Jun 23 '20 at 19:17
  • Hi, i've tried to do what you advice me but i can't find anything that contains mysqld
    – Tommaso
    Jun 25 '20 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
    Jun 25 '20 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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