Mysql – what’s difference between sql_log_bin and log_bin in MySQL?

MySQLreplication

enter image description here

can anybody tell me what is the difference between them ?

Best Answer

log_bin is a global variable that is set at runtime. It determines if binary logging should take place, and (if set) the basename of the binary logs. It cannot be changed without restarting the database.

http://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html#option_mysqld_log-bin

sql_log_bin is a global OR session variable that can be set after the server is running. It's main use is as a SESSION variable to prevent statements from the current session being written to the binary log. Use as a GLOBAL variable is not recomended.

https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_sql_log_bin