Bug #102684 sql_log_off=1 causes Mysql to not start
Submitted: 22 Feb 2021 10:09 Modified: 22 Feb 2021 17:08
Reporter: Jean-Sebastien Theodore Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:8.0.22 OS:Red Hat
Assigned to: CPU Architecture:x86
Tags: sql_log_off

[22 Feb 2021 10:09] Jean-Sebastien Theodore
Description:
Each time we set the sql_log_off=1 in the my.cnf we are unable to start the mysql server.

In the error log file we have : [ERROR] [MY-000067] [Server] unknown variable 'sql_log_off=ON'.

How to repeat:
In the my.cnf,  add the line 'sql_log_off=1' and try to start the mysql server.
[22 Feb 2021 12:33] Tsubasa Tanaka
sql_log_bin has only session-scope.
my.cnf is to set global-scope server variables, and mysqld says "unknown variable" is correct.
 
https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_sql_log...

Global-scope sql_log_bin got to be read only variable from MySQL 5.6.22.

https://dev.mysql.com/doc/refman/5.6/en/set-sql-log-bin.html
[22 Feb 2021 13:31] MySQL Verification Team
Please check the option file column: https://dev.mysql.com/doc/refman/8.0/en/server-system-variable-reference.html. Thanks.
[22 Feb 2021 14:39] Jean-Sebastien Theodore
Hello,

Thanks for your reply but I am not talking about sql_log_bin but sql_log_off which has a global scope as it is mentioned in the documentation (https://dev.mysql.com/doc/refman/8.0/en/server-system-variable-reference.html ).

I can modified this system variable with the following command 'set global sql_log_off=1;' but I cannot start my Mysql server with this parameter in the my.cnf configuration file. Moreover even after having setting it to ON, the sql are always logged in the general log file.

Thanks for your help.

Best regards.
[22 Feb 2021 14:44] MySQL Verification Team
I was mentioning sql_log_off as not flagged as option file column so !bug.
[22 Feb 2021 14:49] MySQL Verification Team
Not Option File

Attachment: 102684.png (image/png, text), 34.57 KiB.

[22 Feb 2021 15:20] Tsubasa Tanaka
I'm sorry for my misreading..
[22 Feb 2021 17:08] Jean-Sebastien Theodore
Hello,

I should have better read this document to see the parameter can not be used in the my.cnf file. I apologize !

But why after having set it with the command 'set global sql_log_off=1' I always can see sql logged in the general log file ?

Regards.