mysql> show variables like '%version%';
+-------------------------+------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------+
| innodb_version | 8.0.11 |
| protocol_version | 10 |
| slave_type_conversions | |
| tls_version | TLSv1,TLSv1.1,TLSv1.2 |
| version | 8.0.11 |
| version_comment | MySQL Community Server - GPL |
| version_compile_machine | x86_64 |
| version_compile_os | linux-glibc2.12 |
| version_compile_zlib | 1.2.11 |
+-------------------------+------------------------------+
9 rows in set (0.00 sec)
mysql> show variables like '%binlog%';
+--------------------------------------------+----------------------+
| Variable_name | Value |
+--------------------------------------------+----------------------+
| binlog_cache_size | 2097152 |
| binlog_checksum | CRC32 |
| binlog_direct_non_transactional_updates | OFF |
| binlog_error_action | ABORT_SERVER |
| binlog_expire_logs_seconds | 2592000 |
| binlog_format | ROW |
| binlog_group_commit_sync_delay | 0 |
| binlog_group_commit_sync_no_delay_count | 0 |
| binlog_gtid_simple_recovery | ON |
| binlog_max_flush_queue_time | 0 |
| binlog_order_commits | ON |
| binlog_row_image | FULL |
| binlog_row_metadata | MINIMAL |
| binlog_row_value_options | |
| binlog_rows_query_log_events | OFF |
| binlog_stmt_cache_size | 32768 |
| binlog_transaction_dependency_history_size | 25000 |
| binlog_transaction_dependency_tracking | COMMIT_ORDER |
| innodb_api_enable_binlog | OFF |
| log_statements_unsafe_for_binlog | ON |
| max_binlog_cache_size | 18446744073709547520 |
| max_binlog_size | 1073741824 |
| max_binlog_stmt_cache_size | 18446744073709547520 |
| sync_binlog | 1 |
+--------------------------------------------+----------------------+
24 rows in set (0.00 sec)
mysql> show variables like '%log_bin%';
+---------------------------------+-----------------------------+
| Variable_name | Value |
+---------------------------------+-----------------------------+
| log_bin | ON |
| log_bin_basename | /home/mysql/node1_bin |
| log_bin_index | /home/mysql/node1_bin.index |
| log_bin_trust_function_creators | OFF |
| log_bin_use_v1_row_events | OFF |
| sql_log_bin | ON |
+---------------------------------+-----------------------------+
6 rows in set (0.01 sec)
相比MySQL5.7.22版本新增了参数:
binlog_expire_logs_seconds
binlog_row_metadata
binlog_row_value_options
binlog_transaction_dependency_history_size
binlog_transaction_dependency_tracking
废弃了参数:
innodb_locks_unsafe_for_binlog。
重点说明binlog的保留时间。
在MySQL8.0.11版本之前有参数expire_logs_days控制默认值是0 表示binlog永不失效,永久保留,此值的单位是天,数据范围是0到99天。
自8.0.11版本开始此功能由binlog_expire_logs_seconds控制,最小单位是秒,默认的最小保留时间是2592000s即30天,取值范围是0到4294967295s(约40710天)。
binlog_rows_query_log_events 参数自5.6.2版本引入此参数,在row模式下,开启该参数,将把sql语句打印到binlog日志里面.默认是0(off).语句查看原始的SQL语句很有帮助。
MySQL 8.0.11 binlog相关的参数
猜你喜欢
转载自blog.csdn.net/vkingnew/article/details/81171210
今日推荐
周排行