mysql 参数sql_log_bin
2017-03-29 09:27
337 查看
SET sql_log_bin = {0|1}
The sql_log_bin variable controls whether logging to the binary log is done. The default value is 1 (do logging). To change logging for the current session, change the session value of this variable. The session user must have the SUPER privilege to set this
variable. Set this variable to 0 for a session to temporarily disable binary logging while making changes to the master which you do not want to replicate to the slave.
As of MySQL 5.5, sql_log_bin can be set as a global or session variable. Setting sql_log_bin globally is only detected when a new session is started. Any sessions previously running are not impacted when setting sql_log_bin globally.
此参数设置的目的一般在主从复制场景,禁用主库的一些操作,比如修改表,权限等,
set sql_log_bin=0;
alter table mytable engine=innodb row_format=compressed;
create user u1 identified by 'china';
set sql_log_bin=1;
The sql_log_bin variable controls whether logging to the binary log is done. The default value is 1 (do logging). To change logging for the current session, change the session value of this variable. The session user must have the SUPER privilege to set this
variable. Set this variable to 0 for a session to temporarily disable binary logging while making changes to the master which you do not want to replicate to the slave.
As of MySQL 5.5, sql_log_bin can be set as a global or session variable. Setting sql_log_bin globally is only detected when a new session is started. Any sessions previously running are not impacted when setting sql_log_bin globally.
此参数设置的目的一般在主从复制场景,禁用主库的一些操作,比如修改表,权限等,
set sql_log_bin=0;
alter table mytable engine=innodb row_format=compressed;
create user u1 identified by 'china';
set sql_log_bin=1;
相关文章推荐
- mysql参数sql_log_bin
- MySQL 参数浅析之 sql_log_bin
- MySQL的log_bin和sql_log_bin 到底有什么区别?
- MYSQL中sql_log_bin变量在复制中的特殊用途
- MYSQLDUMPSLOW用法,SELECT /*!40001 SQL_CACHE */ * FROM解疑惑,log-bin,
- mysql命令:set sql_log_bin=on/off
- MySQL的log_bin和sql_log_bin 的区别
- SQL创建函数不成功的问题-log_bin_trust_function_creators参数研究
- mysql----------mysql5.7.11导入sql文件的时候报错log_bin_trust_function_creators
- MySQL参数log_bin_trust_function_creators介绍
- MySQL的log_bin和sql_log_bin 到底有什么区别?
- Mysql,log_bin 与 sql_log_bin的区别
- mysql通过bin-log日志恢复误删除数据
- MySql带参数的存储过程编写(动态执行SQL语句)
- JMS之—— ActiveMQ中使用mysql做持久化报错:Cannot execute statement: impossible to write to binary log since BINL
- MySQL用户授权 和 bin-log日志 详解和实战(http://www.cnblogs.com/it-cen/p/5234345.html)
- mysql参数之:SQL_QUOTE_SHOW_CREATE
- mysql relay log参数汇总
- mysql的sql调优:general_log_file
- mysql 通过bin-log恢复数据方法详解