Binary Logging Formats

Binary Logging Formats

  The server uses several logging formats to record information in the binary log. The exact format employed depends on the version of MySQL being used. There are three logging formats:

  • Replication capabilities in MySQL originally were based on propagation of SQL statements from master to slave. This is called statement-based logging. You can cause this format to be used by starting the server with --binlog-format=STATEMENT.
  • In row-based logging, the master writes events to the binary log that indicate how individual table rows are affected. It is important therefore that tables always use a primary key to ensure rows can be efficiently identified. You can cause the server to use row-based logging by starting it with --binlog-format=ROW.
  • A third option is also available: mixed logging. With mixed logging, statement-based logging is used by default, but the logging mode switches automatically to row-based in certain cases as described below. You can cause MySQL to use mixed logging explicitly by starting mysqld with the option --binlog-format=MIXED.

The logging format can also be set or limited by the storage engine being used. This helps to eliminate issues when replicating certain statements between a master and slave which are using different storage engines.

参考:

1、http://www.cnblogs.com/sunziying/p/6587945.html

2、https://dev.mysql.com/doc/refman/5.7/en/binary-log-formats.html

时间: 2024-11-05 19:05:05

Binary Logging Formats的相关文章

错误代码: 1381 You are not using binary logging

1.错误描述 1 queries executed, 0 success, 1 errors, 0 warnings 查询:show master logs 错误代码: 1381 You are not using binary logging 执行耗时 : 0 sec 传送时间 : 0 sec 总耗时 : 0.002 sec 2.错误原因 #显示二进制日志数目 SHOW MASTER LOGS; 3.解决办法 由出错代码可知,没有用二进制日志

mysql 创建函数ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_f

mysql 创建函数的时候 报错 ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)ERROR 1418 (HY000

涉及到复制和二进制日志中的选项和变量-Replication and Binary Logging Options and Variables

在搭建复制中,有些参数需要我们留意,在这里罗列出来,供大家参考一下,以GTID为基础 --server-id server-id:这是一个全局的可动态调整的变量,取值范围为0-4294967295,也就是2的32次方减1,这个选项必须在master和slave中都分别进行设置,如果不设置保持默认,则在连接过程中会产生错误.从而复制失败,将这个参数配置在my.cnf配置文件中,然后重启生效 2. --server_uuid server_uuid:这是一个全局只读的变量,非动态变量,以一个字符串的

this function has none of deterministic, no sql,or reads sql data in its declaration and binary logging is enabled

原址:http://blog.chinaunix.net/uid-20639775-id-3031821.html This function has none of DETERMINISTIC, NO SQL解决办法 创建存储过程时 出错信息: ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging i

[Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creator【s

问题:执行创建函数的sql文件报错如下: [Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) 解决办法也有两种, 第一种是在创建子程

Error Code: 1418. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled...

Error Code: 1418. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) 解决方法: 解决办法也有两种, 第一种是在创建子程序(存储过程.函数.

This function has none of Deterministic,no sql,or reads sql data in its declaration and binary logging is enabled(you *might* want to use the less safe log_bin_trust_function_creators variable

这是我们开启了bin-log, 我们就必须指定我们的函数是否是1 DETERMINISTIC 不确定的2 NO SQL 没有SQl语句,当然也不会修改数据3 READS SQL DATA 只是读取数据,当然也不会修改数据4 MODIFIES SQL DATA 要修改数据5 CONTAINS SQL 包含了SQL语句 其中在function里面,只有 DETERMINISTIC, NO SQL 和 READS SQL DATA 被支持.如果我们开启了 bin-log, 我们就必须为我们的funct

关于binary log那些事

阅读目录(Content) 1 what's binary log 2 Binary Logging Options and Variables 2.1 基础参数 2.2 重要参数(sync_binlog=0丢失数据的描述有疑问,目前查阅相关资料跟咨询业界人士中....) 3 Binary Logging Formats 3.1 binlog_format=statement 3.2 binlog_format=row 3.2.1 binlog_row_image默认full,binlog_ro

关于binary log一点总结[转]

阅读目录(Content) 1 what's binary log 2 Binary Logging Options and Variables 2.1 基础参数 3 Binary Logging Formats 3.1 binlog_format=statement 3.2 binlog_format=row 3.2.1 binlog_row_image默认full,binlog_rows_query_log_events默认false 3.2.2 binlog_rows_query_log_