can anybody tell me what is the difference between them ?
Mysql – what’s difference between sql_log_bin and log_bin in MySQL?
MySQLreplication
Related Question
- MySQL – Difference Between COUNT(*) and COUNT(1)
- MySQL Community Server vs MySQL Community Server Minimal – Key Differences
- Mysql – What are the major differences between thesql5.6 and thesql 5.7
- MySQL – Difference Between wait_timeout and connect_timeout
- MySQL Replication – Difference Between Replicate_Wild_Ignore_Table and Replicate_Ignore_Table
- Mysql – Difference between host ‘*’ and host ‘%’
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