This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-21. For the latest, interactive version please visit https://mariadb.com/kb/.

Replication and Binary Log Server System Variables

Contents

  1. auto_increment_increment
  2. auto_increment_offset
  3. binlog_annotate_row_events
  4. binlog_cache_size
  5. binlog_checksum
  6. binlog_commit_wait_count
  7. binlog_commit_wait_usec
  8. binlog_direct_non_transactional_updates
  9. binlog_format
  10. binlog_optimize_thread_scheduling
  11. binlog_row_image
  12. binlog_stmt_cache_size
  13. default_master_connection
  14. encrypt_binlog
  15. expire_logs_days
  16. gtid_binlog_pos
  17. gtid_binlog_state
  18. gtid_current_pos
  19. gtid_domain_id
  20. gtid_seq_no
  21. gtid_slave_pos
  22. gtid_strict_mode
  23. init_slave
  24. last_gtid
  25. log_bin
  26. log_bin_basename
  27. log_bin_index
  28. log_bin_trust_function_creators
  29. log_slave_updates
  30. master_retry_count
  31. master_verify_checksum
  32. max_binlog_cache_size
  33. max_binlog_size
  34. max_binlog_stmt_cache_size
  35. max_relay_log_size
  36. read_binlog_speed_limit
  37. relay_log
  38. relay_log_basename
  39. relay_log_index
  40. relay_log_info_file
  41. relay_log_purge
  42. relay_log_recovery
  43. relay_log_space_limit
  44. replicate_annotate_row_events
  45. replicate_do_db
  46. replicate_do_table
  47. replicate_events_marked_for_skip
  48. replicate_ignore_db
  49. replicate_ignore_table
  50. replicate_rewrite_db
  51. replicate_wild_do_table
  52. replicate_wild_ignore_table
  53. report_host
  54. report_password
  55. report_port
  56. report_user
  57. server_id
  58. skip_parallel_replication
  59. skip_replication
  60. slave_compressed_protocol
  61. slave_ddl_exec_mode
  62. slave_domain_parallel_threads
  63. slave_exec_mode
  64. slave_load_tmpdir
  65. slave_max_allowed_packet
  66. slave_net_timeout
  67. slave_parallel_max_queued
  68. slave_parallel_mode
  69. slave_parallel_threads
  70. slave_parallel_workers
  71. slave_run_triggers_for_rbr
  72. slave_skip_errors
  73. slave_sql_verify_checksum
  74. slave_transaction_retries
  75. slave_type_conversions
  76. sql_log_bin
  77. sql_slave_skip_counter
  78. sync_binlog
  79. sync_master_info
  80. sync_relay_log
  81. sync_relay_log_info

This page lists system variables that are related to binary logging and replication.

See Server System Variables for a complete list of system variables and instructions on setting them.

Also see mysqld replication options for related options that are not system variables.

See also the Full list of MariaDB options, system and status variables.

auto_increment_increment

  • Описание: The increment for all AUTO_INCREMENT values on the server, by default 1. Intended for use in master-to-master replication.
  • Командная строка: --auto-increment-increment[=#]
  • Область: Глобальный, Session
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 1
  • Диапазон: 1 - 65535

auto_increment_offset

  • Описание: The offset for all AUTO_INCREMENT values on the server, by default 1. Intended for use in master-to-master replication.
  • Командная строка: --auto-increment-offset[=#]
  • Область: Глобальный, Session
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 1
  • Диапазон: 1 - 65535

binlog_annotate_row_events

This option tells the master to write annotate_rows_events to the binary log.

  • Командная строка: --binlog-annotate-row-events[={0|1}]
  • Область: Глобальный, Session
  • Тип доступа: Dynamic
  • Тип данных: boolean
  • По умолчанию:
  • Введено: MariaDB 5.3

binlog_cache_size

  • Описание: If the binary log is active, this variable determines the size in bytes of the cache holding a record of binary log changes during a transaction. Since MariaDB 5.5, a separate variable, binlog_stmt_cache_size, has determined the cache size for binary log statements outside of a transaction. The binlog_cache_disk_use and binlog_cache_use server status variables will indicate whether this variable needs to be increased (you want a low ratio of binlog_cache_disk_use to binlog_cache_use).
  • Командная строка: --binlog-cache-size=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 32768
  • Диапазон - 32 bit: 4096 - 4294967295
  • Диапазон - 64 bit: 4096 - 18446744073709547520

binlog_checksum

  • Описание: In MariaDB 5.3, enables/disables the binlog checksums. Since MariaDB 5.5, specifies the type of BINLOG_CHECKSUM_ALG for log events in the binary log.
  • Commandline:
    • --binlog-checksum=name
    • --binlog-checksum=[0|1]
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: string
  • По умолчанию:
  • Допустимые значения: NONE (0), CRC32 (1)
  • Введено: MariaDB 5.3

binlog_commit_wait_count

  • Описание: For use in parallel replication. The binary log can delay the commit step of a transaction until the given number of transactions are all ready to commit together (group commit). The delay will however not be longer than the value set by binlog_commit_wait_usec. The default value of 0 means that no delay is introduced. Setting this value can reduce I/O on the binary log and give an increased opportunity for parallel apply on the slave, but too high a value will decrease the commit throughput. By monitoring the status variable binlog_group_commit_trigger_count (>=MariaDB 10.1.5) it is possible to see how often this is occurring.
  • Starting with MariaDB 10.0.18 and MariaDB 10.1.4: If the server detects that one of the committing transactions T1 holds an InnoDB/XtraDB row lock that another transaction T2 is waiting for, then the commit will complete immediately without further delay. This helps avoid losing throughput when many transactions need conflicting locks. This often makes it safe to use this option without losing throughput on a slave with parallel replication, provided the value of slave_parallel_threads is sufficiently high.
  • Командная строка: --binlog-commit-wait-count=#]
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 0
  • Диапазон: 0 - 18446744073709551615
  • Введено: MariaDB 10.0.5

binlog_commit_wait_usec

  • Описание: For use in parallel replication. The binary log can delay the commit step of a transaction by this many microseconds. By monitoring the status variable binlog_group_commit_trigger_timeout (>=MariaDB 10.1.5) it is possible to see how often group commits are made due to binlog_commit_wait_usec. As soon as the number of pending commits reaches binlog_commit_wait_count, the wait will be terminated, though. Thus, this setting only takes effect if binlog_commit_wait_count is non-zero.
  • Командная строка: --binlog-commit-wait-usec#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 100000
  • Диапазон: 0 - 18446744073709551615
  • Введено: MariaDB 10.0.5

binlog_direct_non_transactional_updates

  • Описание: Replication inconsistencies can occur due when a transaction updates both transactional and non-transactional tables and the updates to the non-transactional tables are visible before being written to the binary log. This is because, to preserve causality, the non-transactional statements are written to the transaction cache, which is only flushed on commit. Setting binlog_direct_non_transactional_updates to 1 (0 is default) will cause non-transactional tables to be written straight to the binary log, rather than the transaction cache. This setting has no effect when row-based binary logging is used, as it requires statement-based logging. See binlog_format. Use with care, and only in situations where no dependencies exist between the non-transactional and transactional tables, for example INSERTing into a non-transactional table based upon the results of a SELECT from a transactional table.
  • Командная строка: --binlog-direct-non-transactional-updates[=value]
  • Область: Глобальный, Session
  • Динамический: Да
  • Тип данных: boolean
  • По умолчанию: OFF (0)
  • Введено: MariaDB 5.5

binlog_format

  • Описание: Determines whether replication is row-based, statement-based or mixed. Statement-based was the default until MariaDB 10.2.3. Be careful of changing the binary log format when a replication environment is already running. See Binary Log Formats. Starting from MariaDB 10.0.22 a slave will apply any events it gets from the master, regardless of the binary log format. binlog_format only applies to normal (not replicated) updates.
  • Командная строка: --binlog-format=format
  • Область: Глобальный, Session
  • Динамический: Да
  • Тип данных: enumeration
  • По умолчанию:
  • Допустимые значения: ROW, STATEMENT или MIXED

binlog_optimize_thread_scheduling

  • Описание: Run fast part of group commit in a single thread, to optimize kernel thread scheduling. On by default. Disable to run each transaction in group commit in its own thread, which can be slower at very high concurrency. This option is mostly for testing one algorithm versus another, and it should not normally be necessary to change it.
  • Командная строка: --binlog-optimize-thread-scheduling or --skip-binlog-optimize-thread-scheduling
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: boolean
  • По умолчанию: ON
  • Введено: MariaDB 5.2

binlog_row_image

  • Описание: Controls whether, in row-based replication, rows should be logged in 'FULL', 'NOBLOB' or 'MINIMAL' formats. In row-based replication (the variable has no effect with statement-based replication), each row change event contains an image for matching against when choosing the row to be updated, and another image containing the changes. Before the introduction of this variable, all columns were logged for both of these images. In certain circumstances, this is not necessary, and memory, disk and network resources can be saved by partial logging. Note that to safely change this setting from the default, the table being replicated to must contain identical primary key definitions, and columns must be present, in the same order, and use the same data types as the original table. If these conditions are not met, matches may not be correctly determined and updates and deletes may diverge on the slave, with no warnings or errors returned.
    • FULL: All columns in the before and after image are logged. This is the default, and the only behavior in earlier versions.
    • NOBLOB: mysqld avoids logging blob and text columns whenever possible (eg, blob column was not changed or is not part of primary key).
    • MINIMAL: A PK equivalent (PK columns or full row if there is no PK in the table) is logged in the before image, and only changed columns are logged in the after image.
  • Командная строка: --binlog-row-image=value
  • Область: Глобальный, Session
  • Динамический: Да
  • Тип данных: enum
  • По умолчанию: FULL
  • Допустимые значения: FULL, NOBLOB or MINIMAL
  • Введено: MariaDB 10.1.6

binlog_stmt_cache_size

  • Описание: If the binary log is active, this variable determines the size in bytes of the cache holding a record of binary log changes outside of a transaction. The variable binlog_cache_size, determines the cache size for binary log statements inside a transaction. The binlog_stmt_cache_disk_use and binlog_stmt_cache_use server status variables will indicate whether this variable needs to be increased (you want a low ratio of binlog_stmt_cache_disk_use to binlog_stmt_cache_use).
  • Командная строка: --binlog-stmt-cache-size=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 32768
  • Диапазон - 32 bit: 4096 - 4294967295
  • Диапазон - 64 bit: 4096 - 18446744073709547520
  • Введено: MariaDB 5.5

default_master_connection

  • Описание: In multi-source replication, specifies which connection will be used for commands and variables if you don't specify a connection.
  • Командная строка: None
  • Область: Session
  • Динамический: Да
  • Тип данных: string
  • По умолчанию: '' (пустая строка)
  • Введено: MariaDB 10.0.1

encrypt_binlog

  • Описание: Encrypt binary logs (including relay logs). See Table and Tablespace Encryption.
  • Командная строка: --encrypt-binlog[={0|1}]
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: boolean
  • По умолчанию: OFF
  • Введено: 10.1.7

expire_logs_days

  • Описание: Number of days after which the binary log will be automatically removed. By default 0, or no automatic removal. When using replication, should always be set higher than the maximum lag by any slave.
  • Командная строка: --expire-logs-days=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 0
  • Диапазон: 0 - 99

init_slave

  • Описание: Similar to init_connect, but the string contains one or more SQL statements, separated by semicolons, that will be executed by a slave server each time the SQL thread starts. These statements are only executed after the acknowledgement is sent to the slave and START SLAVE completes.
  • Командная строка: --init-slave=name
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: string

log_bin

  • Описание: Whether binary logging is enabled or not. If the --log-bin option is used, log_bin will be set to ON, otherwise it will be OFF. If no name option is given for --log-bin, datadir/'log-basename'-bin or 'datadir'/mysql-bin will be used (the latter if --log-basename is not specified). We strongly recommend you use either --log-basename or specify a filename to ensure that replication doesn't stop if the real hostname of the computer changes. The name option can optionally include an absolute path. If no path is specified, the log will be written to the data directory.
  • Командная строка: --log-bin[=name]
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: boolean

log_bin_basename

  • Описание: The full path of the binary log file names, excluding the extension. Its value is derived from the rules specified in log_bin system variable.
  • Командная строка: No commandline option
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: string
  • Только чтение: Да
  • Введено: MariaDB 10.1.6

log_bin_index

  • Описание: File that holds the names for last binlog files.
  • Командная строка: --log-bin-index=name
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: string
  • Введено: MariaDB 10.1.6

log_bin_trust_function_creators

  • Описание: By default, CREATE FUNCTION statements are not accepted unless they specify one of DETERMINISTIC, NO SQL or READS SQL DATA. This is because functions that are not one of these may have unexpected consequences on a slave server if they are used in replication. Setting this variable to 1 relaxes this restriction as well as permitting users to create stored routine and stored functions without the SUPER privilege.
  • Командная строка: --log-bin-trust-function-creators[={0|1}]
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: boolean
  • По умолчанию: OFF

log_slave_updates

  • Описание: If set to 0, the default, updates on a slave received from a master during replication are not logged in the slave's binary log. If set to 1, they are. The slave's binary log needs to be enabled for this to have an effect. Set to 1 if you want to daisy-chain the slaves.
  • Командная строка: --log-slave-updates
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: boolean
  • По умолчанию: OFF

master_retry_count

  • Описание: Number of times a slave will attempt to connect to a master before giving up. The retry interval is determined by the MASTER_CONNECT_RETRY option for the CHANGE MASTER statement. A value of 0 means the slave will not stop attempting to reconnect. Reconnects are triggered when a slave has timed out. See slave_net_timeout.
  • Командная строка: --master-retry-count=#
  • Type: numeric
  • По умолчанию: 86400
  • Диапазон - 32 bit: 0 - 4294967295
  • Диапазон - 64 bit: 0 - 18446744073709551615
  • Deprecated: MySQL 5.6.1

master_verify_checksum

  • Описание: Verify binlog checksums when reading events from the binlog on the master.
  • Командная строка: --master-verify-checksum=[0|1]
  • Область: Глобальный
  • Тип доступа: Can be changed dynamically
  • Тип данных: bool
  • По умолчанию: OFF (0)
  • Введено: MariaDB 5.3

max_binlog_cache_size

  • Описание: Restricts the size used to cache a multi-transactional query. See max_binlog_stmt_cache_size and binlog_cache_size.
  • Командная строка: --max-binlog-cache-size=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 18446744073709547520
  • Диапазон: 4096 - 18446744073709547520

max_binlog_size

  • Описание: If the binary log exceeds this size after a write, the server rotates it by closing it and opening a new binary log. Single transactions will always be stored in the same binary log, so the server will wait for open transactions to complete before rotating. This figure also applies to the size of relay logs if max_relay_log_size is set to zero.
  • Командная строка: --max-binlog-size=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 1073741824 (1GB)
  • Диапазон: 4096 - 1073741824 (4KB - 1GB)

max_binlog_stmt_cache_size

  • Описание: Restricts the size used to cache non-transactional statements. See max_binlog_cache_size and binlog_stmt_cache_size.
  • Командная строка: --max-binlog-stmt-cache-size=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 18446744073709547520 (64 bit), 4294963200 (32 bit)
  • Диапазон: 4096 - 18446744073709547520
  • Введено: MariaDB 5.5

max_relay_log_size

  • Описание: Slave will rotate its relay log if it exceeds this size after a write. If set to 0, the max_binlog_size setting is used instead. Before MariaDB 10.0, max_binlog_size was global only, but with the implementation of multi-source replication in MariaDB 10.0, it could be set per session as well.
  • Командная строка: --max-relay-log-size=#
  • Область: Глобальный, Session (from MariaDB 10.0 only)
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 0
  • Диапазон: 0, или 4096 или 1073741824 (4KB - 1GB)

read_binlog_speed_limit

  • Описание: Used to restrict the speed at which a replication slave can read the binlog from the master. This can be used to reduce the load on a master if many slaves need to download large amounts of old binlog files at the same time. The network traffic will be restricted to the specified number of kilobytes per second.
  • Командная строка: --read-binlog-speed-limit=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 0 (без ограничений)
  • Диапазон: 0 - 18446744073709551615
  • Введено: MariaDB 10.2.3

relay_log

  • Описание: Relay log basename. If not set, the basename will be hostname-relay-bin.
  • Командная строка: --relay-log=file_name
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: filename
  • По умолчанию: '' (отсутствует)

relay_log_basename

  • Описание: The full path of the relay log file names, excluding the extension. Its value is derived from the relay-log variable value.
  • Командная строка: No commandline option
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: string
  • Только чтение: Yes
  • Введено: MariaDB 10.1.6

relay_log_index

  • Описание: Name and location of the relay log index file, the file that keeps a list of the last relay logs. Defaults to hostname-relay-bin.index.
  • Командная строка: --relay-log-index=name
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: string

relay_log_info_file

  • Описание: Name and location of the relay log information file, the file that remembers where the SQL replication thread is in the relay logs..
  • Командная строка: --relay-log-info-file=file_name
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: string
  • По умолчанию: relay-log.info

relay_log_purge

  • Описание: If set to 1 (the default), relay logs will be purged as soon as they are no longer necessary.
  • Командная строка: --relay-log-purge={0|1}
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: boolean
  • По умолчанию: ON
  • Примечание: In MySQL and in MariaDB before version 10.0.8 this variable was silently changed if you did CHANGE MASTER.

relay_log_recovery

  • Описание: If set to 1 (0 is default), the slave will drop all relay logs that haven't yet been processed, and retrieve relay logs from the master. Can be useful after the slave has crashed to prevent the processing of corrupt relay logs.
  • Командная строка: --relay-log-recovery
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: boolean
  • По умолчанию: OFF

relay_log_space_limit

  • Описание: Specifies the maximum space to be used for the relay logs. The IO thread will stop until the SQL thread has cleared the backlog. By default 0, or no limit.
  • Командная строка: --relay-log-space-limit=#
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: numeric
  • По умолчанию: 0
  • Диапазон - 32 bit: 0 - 4294967295
  • Диапазон - 64 bit: 0 - 18446744073709547520

replicate_annotate_row_events

  • Описание: Tells the slave to reproduce annotate_rows_events received from the master in its own binary log. This option is sensible only when used in tandem with the log_slave_updates option.
  • Командная строка: --replicate-annotate-row-events
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: boolean
  • По умолчанию:
  • Введено: MariaDB 5.3

replicate_do_db

  • Описание: Slave threads will be restricted to replicating the specified databases, provided in comma-delimited format. Will not work with cross-database queries such as UPDATE some_db.some_table SET foo='bar' while having selected a different or no database. Use replicate_wild_do_table for this purpose. replicate-do-db is executed after the replicate-rewrite-db mysqld option. It also does not accept a comma-delimited list, and needs to be used multiple times to specify multiple databases (on both the commandline and in configuration files). See Dynamic replication variables for more information.
  • Командная строка: --replicate-do-db=name
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: string
  • По умолчанию: '' (пустой)
  • Введено: MariaDB 5.5.22 (в виде переменной)

replicate_do_table

  • Описание: Slave threads will be restricted to replicating the specified tables, provided in comma-delimited format. See Dynamic replication variables for more information. The directive does not accept a comma-delimited list, and needs to be used multiple times to specify multiple tables (on both the commandline and in configuration files).
  • Командная строка: --replicate-do-table=name
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: string
  • По умолчанию: '' (пустой)
  • Введено: MariaDB 5.5.22 (в виде переменной)

replicate_events_marked_for_skip

  • Описание: Tells the slave whether to replicate events that are marked with the @@skip_replication flag. See Selectively skipping replication of binlog events for more information.
  • Командная строка: --replicate-events-marked-for-skip
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: enumeration
  • По умолчанию: replicate
  • Допустимые значения: REPLICATE, FILTER_ON_SLAVE, FILTER_ON_MASTER
  • Введено: MariaDB 5.5.21

replicate_ignore_db

  • Описание: The slave will ignore any changes to tables in the replication stream for the specified databases, provided in comma-delimited format. Will not work with cross-database queries such as UPDATE some_db.some_table SET foo='bar' while having selected a different or no database. Use replicate_wild_ignore_table for this purpose. See Dynamic replication variables for more information. The directive does not accept a comma-delimited list, and needs to be used multiple times to specify multiple databases (on both the commandline and in configuration files).
  • Командная строка: --replicate-ignore-db=name
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: string
  • По умолчанию: '' (пустой)
  • Введено: MariaDB 5.5.22 (в виде переменной)

replicate_ignore_table

  • Описание: The slave will ignore any changes in the replication stream to the specified tables, provided in comma-delimited format. See Dynamic replication variables for more information. The directive does not accept a comma-delimited list, and needs to be used multiple times to specify multiple tables (on both the commandline and in configuration files).
  • Командная строка: --replicate-ignore-table=name
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: string
  • По умолчанию: '' (пустой)
  • Введено: MariaDB 5.5.22 (в виде переменной)

replicate_rewrite_db


replicate_wild_do_table

  • Описание: Slave threads will be restricted to replicating tables that match the specified wildcard pattern (see LIKE for a description of wildcards). For example replicate-wild-do-table=foo%.bar% will replicate only updates to tables in all databases that start with foo and whose table names start with bar. Will work with cross-database updates. The directive does not accept a comma-delimited list, and needs to be used multiple times to specify multiple wildcard patterns (on both the commandline and in configuration files). Databases, tables, views and triggers are affected, but the restriction does not apply to stored procedures, stored functions or events - replicate_do_db and replicate_ignore_db are required for these. With a % wildcard for the table name, all tables in the database will be matched, as well as statements such as CREATE DATABASE, ALTER DATABASE and DROP DATABASE. Wildcard characters that form part of the name can be escaped if required, for example --replicate-wild-do-table=old\_database.%. You may need to quote the option value or use double escapes in some shell environments. See Dynamic replication variables for more information.
  • Командная строка: --replicate-wild-do-table=name
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: string
  • По умолчанию: '' (пустой)
  • Введено: MariaDB 5.5.22 (в виде переменной)

replicate_wild_ignore_table

  • Описание: The slave will ignore any changes in the replication stream for tables that match the specified wildcard pattern. For example replicate-wild-ignore-table=foo%.bar% will not do updates to tables in databases that start with foo and whose table names start with bar. Will work with cross-database updates. The directive does not accept a comma-delimited list, and needs to be used multiple times to specify multiple wildcard patterns (on both the commandline and in configuration files). See Dynamic replication variables for more information.
  • Командная строка: --replicate-wild-ignore-table=name
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: string
  • По умолчанию: '' (пустой)
  • Введено: MariaDB 5.5.22 (в виде переменной)

report_host

  • Описание: The host name or IP address the slave reports to the master when it registers. If left unset, the slave will not register itself. Reported by SHOW SLAVE HOSTS. Note that it is not sufficient for the master to simply read the IP of the slave from the socket once the slave connects. Due to NAT and other routing issues, that IP may not be valid for connecting to the slave from the master or other hosts.
  • Командная строка: --report-host=host_name
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: string

report_password

  • Описание: Slave password reported to the master when it registers. Reported by SHOW SLAVE HOSTS if --show-slave-auth-info is set. This password has no connection with user privileges or with the replication user account password.
  • Командная строка: --report-password=password
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: string

report_port

  • Описание: The commandline option sets the TCP/IP port for connecting to the slave that will be reported to the replicating master during the slave's registration. Viewing the variable will show this value.
  • Командная строка: --report-port=#
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: numeric
  • По умолчанию: 0
  • Диапазон: 0 - 65535

report_user

  • Описание: Slave's account user name reported to the master when it registers. Reported by SHOW SLAVE HOSTS if --show-slave-auth-info is set. This username has no connection with user privileges or with the replication user account.
  • Командная строка: --report-user=name
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: string

server_id

  • Описание: Used to identify master and slave servers in replication. The server_id must be unique for each server in the replicating group. If left at 0, the default, a slave will not connect to a master, and a master will refuse all slave connections.
  • Командная строка: --server-id =#
  • Область: Глобальный, Session (>= MariaDB 10.0.2 only - see Global Transaction ID)
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 1 (>= MariaDB 10.2.2), 0 (<= MariaDB 10.2.1)
  • Диапазон: 1 - 4294967295 (>= MariaDB 10.2.2), 0 - 4294967295 (<= MariaDB 10.2.1)

skip_parallel_replication

  • Описание: If set when a transaction is written to the binlog, parallel apply of that transaction will be avoided on a slave where slave_parallel_mode is not aggressive. Can be used to avoid unnecessary rollback and retry for transactions that are likely to cause a conflict if replicated in parallel. See parallel replication.
  • Командная строка: None
  • Область: Session
  • Динамический: Да
  • Тип данных: boolean
  • По умолчанию: OFF
  • Введено: MariaDB 10.1.3

skip_replication

  • Описание: Changes are logged into the binary log with the @@skip_replication flag set. Such events will not be replicated by slaves that run with --replicate-events-marked-for-skip set different from its default of REPLICATE. See Selectively skipping replication of binlog events for more information.
  • Командная строка: None
  • Область: Session
  • Динамический: Да
  • Тип данных: boolean
  • По умолчанию: OFF
  • Введено: MariaDB 5.5.21

slave_compressed_protocol

  • Описание: If set to 1 (0 is the default), will use compression for the slave/master protocol if both master and slave support this.
  • Командная строка: --slave-compressed-protocol
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: boolean
  • По умолчанию: 0

slave_ddl_exec_mode

  • Описание: Modes for how replication of DDL events should be executed. Legal values are STRICT and IDEMPOTENT (default). In IDEMPOTENT mode, the slave will not stop for failed DDL operations that would not cause a difference between the master and the slave. In particular CREATE TABLE is treated as CREATE OR REPLACE TABLE and DROP TABLE is treated as DROP TABLE IF EXISTS.
  • Командная строка: --slave-ddl-exec-mode=name
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: enumeration
  • По умолчанию: IDEMPOTENT
  • Допустимые значения: IDEMPOTENT, STRICT
  • Введено: MariaDB 10.0.8

slave_domain_parallel_threads

  • Описание: When set to a non-zero value, each replication domain in one master connection can reserve at most that many worker threads at any one time, leaving the rest (up to the value of slave_parallel_threads) free for other master connections or replication domains to use in parallel. See Parallel Replication for details.
  • Командная строка: --slave-domain-parallel-threads=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 0
  • Допустимые значения: 0 - 16383
  • Введено: MariaDB 10.0.9

slave_exec_mode

  • Описание: Determines the mode used for replication error checking and conflict resolution. STRICT mode is the default, and catches all all errors and conflicts. IDEMPOTENT mode suppresses duplicate key or no key errors, which can be useful in certain replication scenarios, such as when there are multiple masters, or circular replication. MySQL Cluster ignores this setting, always treating it as IDEMPOTENT.
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: enumeration
  • По умолчанию: IDEMPOTENT (NDB), STRICT (All)
  • Допустимые значения: IDEMPOTENT, STRICT

slave_load_tmpdir

  • Описание: Directory where the slave stores temporary files for replicating LOAD DATA INFILE statements. If not set, the slave will use tmpdir. Should be set to a disk-based directory that will survive restarts, or else replication may fail.
  • Командная строка: --slave-load-tmpdir=path
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: file name
  • По умолчанию: /tmp

slave_max_allowed_packet

  • Описание: Maximum packet size in bytes for slave SQL and I/O threads. This value overrides max_allowed_packet for replication purposes. Set in multiples of 1024 (the minimum) up to 1GB
  • Командная строка: --slave-max-allowed-packet=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 1073741824
  • Диапазон: 1024 - 1073741824
  • Введено: MariaDB 5.5.26

slave_net_timeout

  • Описание: Time in seconds for the slave to wait for more data from the master before considering the connection broken, after which it will abort the read and attempt to reconnect. The retry interval is determined by the MASTER_CONNECT_RETRY open for the CHANGE MASTER statement, while the maximum number of reconnection attempts is set by the master-retry-count variable. The first reconnect attempt takes place immediately.
  • Командная строка: --slave-net-timeout=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию:
  • Диапазон: 1 upwards

slave_parallel_max_queued

  • Описание: In parallel_replication, sets the memory limit for SQL threads when looking ahead in the relay log. The limit is per-worker-thread, so the total memory used is up to @@slave_parallel_max_queued * @@slave_parallel_threads (plus some overhead for managing internal data structures). Only used when slave_parallel_threads is not zero. Also see the description on the parallel replication page.
  • Командная строка: --slave-parallel-max-queued=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 131072
  • Диапазон: 0 - 2147483647
  • Введено: MariaDB 10.0.5

slave_parallel_mode

  • Описание: Controls what transactions are applied in parallel when using parallel_replication.
    • optimistic: tries to apply most transactional DML in parallel, and handles any conflicts with rollback and retry. See optimistic mode.
    • conservative: limits parallelism in an effort to avoid any conflicts. See conservative mode.
    • aggressive: tries to maximise the parallelism, possibly at the cost of increased conflict rate.
    • minimal: only parallelizes the commit steps of transactions.
    • none disables parallel apply completely.
  • Командная строка: None
  • Область: Глобальный
  • Динамический:
  • Тип данных: enum
  • По умолчанию: conservative
  • Допустимые значения: conservative, optimistic, none, aggressive и minimal
  • Введено: MariaDB 10.1.3

slave_parallel_threads

  • Описание: Used by parallel_replication. Determines the number of threads to spawn to apply in parallel events on the slave that were group-committed on the master or were logged with GTID in different replication domains. Slaves must be down when this variable is changed.
  • Командная строка: --slave-parallel-threads=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 0
  • Диапазон: 0 - 16383
  • Введено: MariaDB 10.0.5

slave_parallel_workers


slave_run_triggers_for_rbr

  • Описание: See Running triggers on the slave for Row-based events for a description and use-case for this setting.
  • Командная строка: --slave-run-triggers-for-rbr=value
  • Область: Глобальный
  • Тип данных: enum
  • По умолчанию: NO
  • Допустимые значения: NO, YES или LOGGING
  • Введено: MariaDB 10.1.1

slave_skip_errors

  • Описание: When an error occurs on the slave, replication usually halts. This option permits a list of error codes to ignore, and for which replication will continue. This option should never be needed in normal use, and careless use could lead to slaves that are out of sync with masters. Error codes are in the format of the number from the slave error log. Using all as an option permits the slave the keep replicating no matter what error it encounters, an option you would never normally need in production and which could rapidly lead to data inconsistencies. MySQL Cluster NDB >= 7.2.6 permits the ddl_exists_errors option, indicating error codes 1007,1008,4050,1051,1054,1060,1061,1068,1094 and 1146. A count of these is kept in slave_skipped_errors.
  • Командная строка: --slave-skip-errors=[error_code1,error_code2,...|all|ddl_exist_errors]
  • Область: Глобальный
  • Динамический: Нет
  • Тип данных: string
  • По умолчанию: OFF
  • Допустимые значения: [list of error codes], all, ddl_exist_errors

slave_sql_verify_checksum

  • Описание: Verify binlog checksums when the slave SQL thread reads events from the relay log.
  • Командная строка: --slave-sql-verify-checksum=[0|1]
  • Область: Глобальный
  • Тип доступа: Может быть изменено динамически
  • Тип данных: bool
  • По умолчанию: ON (1)
  • Введено: MariaDB 5.3

slave_transaction_retries

  • Описание: Number of times a replication slave retries to execute an SQL thread after it fails due to InnDB deadlock or by exceeding the transaction execution time limit. If after this number of tries the SQL thread has still failed to execute, the slave will stop with an error. See also the innodb_lock_wait_timeout system variable.
  • Командная строка: --slave-transaction-retries=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 10
  • Диапазон - 32 bit: 0 - 4294967295
  • Диапазон - 64 bit: 0 - 18446744073709547520

slave_type_conversions

  • Описание: Determines the type conversion mode on the slave when using row-based replication, including replications in MariaDB Galera cluster. Multiple options can be set, delimited by commas. If left empty, the default, type conversions are disallowed. The variable is dynamic and a change in its value takes effect immediately. This variable tells the server what to do if the table definition is different between the master and slave (for example a column is 'int' on the master and 'bigint' on the slave).
    • ALL_NON_LOSSY means that all safe conversions (no data loss) are allowed.
    • ALL_LOSSY means that all lossy conversions are allowed (for example 'bigint' to 'int'). This, however, does not imply that safe conversions (non-lossy) are allowed as well. In order to allow all conversions, one needs to allow both lossy as well as non-lossy conversions by setting this variable to ALL_NON_LOSSY,ALL_LOSSY.
    • Empty (default) means that the server should give an error and replication should stop if the table definition is different between the master and slave.
  • Командная строка: --slave-type-conversions=set
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: set
  • По умолчанию: Пустое значение
  • Допустимые значения: ALL_LOSSY, ALL_NON_LOSSY, пустой
  • Введено: MariaDB 5.5

sql_log_bin

  • Описание: If set to 0 (1 is the default), no logging to the binary log is done for the client. Only clients with the SUPER privilege can update this variable. Can have unintended consequences if set globally, see SET SQL_LOG_BIN. Starting MariaDB 10.1.7, this variable does not affect the replication of events in a Galera cluster.
  • Область: Глобальный (before MariaDB 10.0.16 and MariaDB 5.5.41 only), Session
  • Динамический: Да
  • Тип данных: boolean
  • По умолчанию: 1

sql_slave_skip_counter

  • Описание: Number of events that a slave skips from the master. If this would cause the slave to begin in the middle of an event group, the slave will instead begin from the beginning of the next event group. See SET GLOBAL sql_slave_skip_counter.
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 0

sync_binlog

  • Описание: MariaDB will synchronize its binary log file to disk after this many events. The default is 0, in which case the operating system handles flushing the file to disk. 1 is the safest, but slowest, choice, since the file is flushed after each write. If autocommit is enabled, there is one write per statement, otherwise there's one write per transaction. If the disk has cache backed by battery, synchronization will be fast and a more conservative number can be chosen.
  • Командная строка: --sync-binlog=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 0
  • Диапазон - 32 bit: 0 - 4294967295
  • Диапазон - 64 bit: 0 - 18446744073709547520

sync_master_info

  • Описание: A replication slave will synchronize its master.info file to disk after this many events. If set to 0, the operating system handles flushing the file to disk.
  • Командная строка: --sync-master-info=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 10000 (>= MariaDB 10.1.7), 0 (<= MariaDB 10.1.6)

sync_relay_log

  • Описание: The MariaDB server will synchronize its relay log to disk after this many writes to the log. The default until MariaDB 10.1.7 was 0, in which case the operating system handles flushing the file to disk. 1 is the safest, but slowest, choice, since the file is flushed after each write. If autocommit is enabled, there is one write per statement, otherwise there's one write per transaction. If the disk has cache backed by battery, synchronization will be fast and a more conservative number can be chosen.
  • Командная строка: --sync-relay-log=#
  • Область: Глобальный
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 10000 (>= MariaDB 10.1.7), 0 (<= MariaDB 10.1.6)

sync_relay_log_info

  • Описание: A replication slave will synchronize its relay-log.info file to disk after this many transactions. The default until MariaDB 10.1.7 was 0, in which case the operating system handles flushing the file to disk. 1 is the most secure choice, because at most one event could be lost in the event of a crash, but it's also the slowest.
  • Командная строка: --sync-relay-log-info=#
  • Область: Глобальный,
  • Динамический: Да
  • Тип данных: numeric
  • По умолчанию: 10000 (>= MariaDB 10.1.7), 0 (<= MariaDB 10.1.6)
  • Диапазон: 0 - 4294967295

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.