对于数据库的操作,经常需要暂时停止对bin-log日志的写入,那就需要这个命令:set sql_log_bin=on/off

参考:dev.mysql.com/doc/refman/5.5/en/set-sql-log-bin.html

13.4.1.3 SET sql_log_bin Syntax

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 theSUPER 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 settingsql_log_bin globally.

Warning

Incorrect use of sql_log_bin with a global scope means any changes made in an already running session are stillbeing recorded to the binary log and therefore replicated. Exercise extreme caution using sql_log_bin with a global scope as the above situation could cause unexpected results including replication failure.

Beginning with MySQL 5.5.5, it is no longer possible to set @@session.sql_log_bin within a transaction or subquery. (Bug #53437)

mysql命令:set sql_log_bin=on/off相关推荐

  1. mysql更改数据文件目录及my.ini位置| MySQL命令详解

    需求:更改mysql数据数据文件目录及my.ini位置. 步骤: 1.查找my.ini位置,可通过windows服务所对应mysql启动项,查看其对应属性->可执行文件路径,获取my.ini路径 ...

  2. mysql 命令源码_MySQL常用命令

    创建用户 CREATE USER 'root'@'%' IDENTIFIED BY 'password'; 创建用户并赋予指定权限 grant create,select,update,insert, ...

  3. mysql 执行cmd,mysql命令行中执行sql的几种方式总结

    1.直接输入sql执行 MySQL> select now(); +---------------------+ | now() | +---------------------+ | 2013 ...

  4. linux mysql 命令 大全

    linux mysql 命令 大全 1.linux下启动mysql的命令:   mysqladmin start /ect/init.d/mysql start (前面为mysql的安装路径) 2.l ...

  5. mysql客户端指令_mysql command line client(mysql命令行客户端)

    mysql command line client(mysql命令行客户端) (2010-03-24 09:18:38) 标签: 文化 分类: 数据库 1.输入密码:****** 2.ues mysq ...

  6. mysql 账户管理_如何用MySQL 命令来实现账户管理

    今天我们要学习的是如何用MySQL 命令的方式来对账号进行管理,我们大家都知道在实际应用中MySQL 命令可以完成多种任务,以下的文章主要是对用MySQL 命令的方式来对账号进行管理的具体内容介绍. ...

  7. mysql的调用有哪三种方式_MySQL数据库之mysql命令行中执行sql的几种方式总结

    本文主要向大家介绍了MySQL数据库之mysql命令行中执行sql的几种方式总结 ,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助. 1.直接输入sql执行 MySQL> se ...

  8. linux下mysql授权_linux下mysql命令(用户授权、数据导入导出)

    1,linux下启动mysql的命令: 复制代码 代码示例: mysqladmin start /ect/init.d/mysql start (前面为mysql的安装路径) 2,linux下重启my ...

  9. python pymysql实例_python笔记-mysql命令使用示例(使用pymysql执行)

    一.mysql命令使用 学习完mysql现在来进行一些测试 1.1.进入mysql 终端输入一下命令,进入数据库 mysql -uusername -p 1.2 进入数据库 在mysql终端输入如下命 ...

最新文章

  1. Get 了滤镜、动画、AR 特效,速来炫出你的短视频开发特技!
  2. C语言项目--教师信息/学生成绩管理系统
  3. HTML5 之前的视频播放格式
  4. (33)调试驱动程序
  5. Hangfire在ASP.NET CORE中的简单实现
  6. c/c++,字符,字符串,各种方式读入与对空格,回车的处理
  7. win7查看tomcat端口_win7
  8. 对CSRF(跨站请求伪造)的理解
  9. LoadRunner11完美破解
  10. win10笔记本ps/2键盘鼠标失灵,错误代码39、错误代码10
  11. Unity 模拟鼠标点击
  12. USB有线网卡怎么用
  13. IE7绿色版下载-转载
  14. 【JS】每日一题:模块化
  15. 货代的主要工作是什么?
  16. 实行会员制能够从哪些方面帮助到门店经营?
  17. Java中的.obj和.what
  18. 粗读《Python 深度学习》(7)
  19. HTTPS IP直连问题小结
  20. python各种模块安装whl文件下载网址

热门文章

  1. fiddler启用过滤规则只显示想要的接口数据
  2. Android系统性能调优工具介绍
  3. mybatis中使用in查询时的注意事项
  4. C#与PHP字符串解压缩
  5. 技术简报 2014-1-27
  6. .iOS APP Project or Mac APP Project编译错误提示: My Mac 64-bit is not valid for Running the scheme...
  7. [Linux] BASH程序设计
  8. 将windows7安装到映像文件方法总结
  9. U-Boot提供的指令
  10. C++ 编码规范建议