Replication and Binary Log System Variables

You are viewing an old version of this article. View the current version here.

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_file_cache_size
  10. binlog_format
  11. binlog_optimize_thread_scheduling
  12. binlog_row_image
  13. binlog_row_metadata
  14. binlog_stmt_cache_size
  15. default_master_connection
  16. encrypt_binlog
  17. expire_logs_days
  18. gtid_binlog_pos
  19. gtid_binlog_state
  20. gtid_current_pos
  21. gtid_domain_id
  22. gtid_seq_no
  23. gtid_slave_pos
  24. gtid_strict_mode
  25. gtid_pos_auto_engines
  26. init_slave
  27. last_gtid
  28. log_bin
  29. log_bin_basename
  30. log_bin_compress
  31. log_bin_compress_min_len
  32. log_bin_index
  33. log_bin_trust_function_creators
  34. log_slow_slave_statements
  35. log_slave_updates
  36. master_verify_checksum
  37. max_binlog_cache_size
  38. max_binlog_size
  39. max_binlog_stmt_cache_size
  40. max_relay_log_size
  41. read_binlog_speed_limit
  42. relay_log
  43. relay_log_basename
  44. relay_log_index
  45. relay_log_info_file
  46. relay_log_purge
  47. relay_log_recovery
  48. relay_log_space_limit
  49. replicate_annotate_row_events
  50. replicate_do_db
  51. replicate_do_table
  52. replicate_events_marked_for_skip
  53. replicate_ignore_db
  54. replicate_ignore_table
  55. replicate_rewrite_db
  56. replicate_wild_do_table
  57. replicate_wild_ignore_table
  58. report_host
  59. report_password
  60. report_port
  61. report_user
  62. server_id
  63. skip_parallel_replication
  64. skip_replication
  65. slave_compressed_protocol
  66. slave_ddl_exec_mode
  67. slave_domain_parallel_threads
  68. slave_exec_mode
  69. slave_load_tmpdir
  70. slave_max_allowed_packet
  71. slave_net_timeout
  72. slave_parallel_max_queued
  73. slave_parallel_mode
  74. slave_parallel_threads
  75. slave_parallel_workers
  76. slave_run_triggers_for_rbr
  77. slave_skip_errors
  78. slave_sql_verify_checksum
  79. slave_transaction_retries
  80. slave_transaction_retry_errors
  81. slave_transaction_retry_interval
  82. slave_type_conversions
  83. sql_log_bin
  84. sql_slave_skip_counter
  85. sync_binlog
  86. sync_master_info
  87. sync_relay_log
  88. 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, as well as System variables for global transaction ID.

Also see mysqld replication options for related options that are not system variables (such as binlog_do_db and binlog_ignore_db).

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

auto_increment_increment

  • Description: The increment for all AUTO_INCREMENT values on the server, by default 1. Intended for use in master-to-master replication.
  • Commandline: --auto-increment-increment[=#]
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 1
  • Range: 1 to 65535

auto_increment_offset

  • Description: The offset for all AUTO_INCREMENT values on the server, by default 1. Intended for use in master-to-master replication. Should be smaller than auto_increment_increment, except when both variables are 1 (default setup).
  • Commandline: --auto-increment-offset[=#]
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 1
  • Range: 1 to 65535

binlog_annotate_row_events

  • Description: This option tells the master to write annotate_rows_events to the binary log.
  • Commandline: --binlog-annotate-row-events[={0|1}]
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value:

binlog_cache_size

  • Description: If the binary log is active, this variable determines the size in bytes, per-connection, of the cache holding a record of binary log changes during a transaction. A separate variable, binlog_stmt_cache_size, sets the upper limit for the statement cache. 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).
  • Commandline: --binlog-cache-size=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 32768
  • Range - 32 bit: 4096 to 4294967295
  • Range - 64 bit: 4096 to 18446744073709547520

binlog_checksum

  • Description: Specifies the type of BINLOG_CHECKSUM_ALG for log events in the binary log.
  • Commandline:
    • --binlog-checksum=name
    • --binlog-checksum=[0|1]
  • Scope: Global
  • Dynamic: Yes
  • Data Type: string
  • Default Value:
  • Valid Values: NONE (0), CRC32 (1)

binlog_commit_wait_count


binlog_commit_wait_usec


binlog_direct_non_transactional_updates

  • Description: 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.
  • Commandline: --binlog-direct-non-transactional-updates[=value]
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: OFF (0)
  • Introduced: MariaDB 5.5

binlog_file_cache_size

  • Description: Size of in-memory cache that is allocated when reading binary log and relay log files.
  • Commandline: --binlog-file-cache-size=#
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 16384
  • Range: 8192 to 18446744073709551615
  • Introduced: MariaDB 10.3.3

binlog_format

  • Description: 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.
  • Commandline: --binlog-format=format
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: enumeration
  • Default Value:
  • Valid Values: ROW, STATEMENT or MIXED

binlog_optimize_thread_scheduling

  • Description: 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.
  • Commandline: --binlog-optimize-thread-scheduling or --skip-binlog-optimize-thread-scheduling
  • Scope: Global
  • Dynamic: No
  • Data Type: boolean
  • Default Value: ON
  • Introduced: MariaDB 5.2

binlog_row_image

  • Description: 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.
  • Commandline: --binlog-row-image=value
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: enum
  • Default Value: FULL
  • Valid Values: FULL, NOBLOB or MINIMAL
  • Introduced: MariaDB 10.1.6

binlog_row_metadata

  • Description: Controls the format used for binlog metadata logging.
    • NO_LOG: No metadata is logged (default).
    • MINIMAL: Only metadata required by a slave is logged.
    • FULL: All metadata is logged.
  • Commandline: --binlog-row-metadata=value
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: enum
  • Default Value: NO_LOG
  • Valid Values: NO_LOG, MINIMAL, FULL
  • Introduced: MariaDB 10.5.0

binlog_stmt_cache_size

  • Description: 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).
  • Commandline: --binlog-stmt-cache-size=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 32768
  • Range - 32 bit: 4096 to 4294967295
  • Range - 64 bit: 4096 to 18446744073709547520
  • Introduced: MariaDB 5.5

default_master_connection

  • Description: In multi-source replication, specifies which connection will be used for commands and variables if you don't specify a connection.
  • Commandline: None
  • Scope: Session
  • Dynamic: Yes
  • Data Type: string
  • Default Value: '' (empty string)
  • Introduced: MariaDB 10.0.1

encrypt_binlog


expire_logs_days

  • Description: Number of days after which the binary log can 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. Removals take place when the server starts up, when the binary log is flushed, when the next binary log is created after the previous one reaches the maximum size, or when running PURGE BINARY LOGS.
  • Commandline: --expire-logs-days=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 0
  • Range: 0 to 99

init_slave

  • Description: 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.
  • Commandline: --init-slave=name
  • Scope: Global
  • Dynamic: Yes
  • Data Type: string

log_bin

  • Description: 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. The name can optionally include the file extension; it will be stripped and only the file basename will be used.
  • Commandline: --log-bin[=name]
  • Scope: Global
  • Dynamic: No
  • Data Type: boolean
  • Default Value: OFF

log_bin_basename

  • Description: 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.
  • Commandline: No commandline option
  • Scope: Global
  • Dynamic: No
  • Data Type: string
  • Read Only: Yes
  • Introduced: MariaDB 10.1.6

log_bin_compress


log_bin_compress_min_len


log_bin_index

  • Description: File that holds the names for last binlog files.
  • Commandline: --log-bin-index=name
  • Scope: Global
  • Dynamic: No
  • Data Type: string
  • Introduced: MariaDB 10.1.6

log_bin_trust_function_creators

  • Description: Functions and triggers can be dangerous when used with replication. Certain types of functions and triggers may have unintended consequences when the statements are applied on a replication slave. For that reason, there are some restrictions on the creation of functions and triggers when the binary log is enabled by default, such as:
    • When log_bin_trust_function_creators is OFF and log_bin is ON, CREATE FUNCTION and ALTER FUNCTION statements will trigger an error if the function is defined with any of the NOT DETERMINISTIC, CONTAINS SQL or MODIFIES SQL DATA characteristics.
    • This means that when log_bin_trust_function_creators is OFF and log_bin is ON, CREATE FUNCTION and ALTER FUNCTION statements will only succeed if the function is defined with any of the DETERMINISTIC, NO SQL, or READS SQL DATA characteristics.
    • When log_bin_trust_function_creators is OFF and log_bin is ON, the SUPER privilege is also required to execute the following statements:
    • Setting log_bin_trust_function_creators to ON removes these requirements around functions characteristics and the SUPER privileges.
    • See Binary Logging of Stored Routines for more information.
  • Commandline: --log-bin-trust-function-creators[={0|1}]
  • Scope: Global
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: OFF

log_slow_slave_statements

  • Description: Log slow statements executed by slave thread to the slow log if it is open. Before MariaDB 10.1.13, this was only available as a mysqld option, not a server variable.
  • Commandline: --log-slow-slave-statements
  • Scope: Global
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value:
  • Introduced: MariaDB 10.1.13 (variable)

log_slave_updates

  • Description: 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.
  • Commandline: --log-slave-updates
  • Scope: Global
  • Dynamic: No
  • Data Type: boolean
  • Default Value: OFF

master_verify_checksum

  • Description: Verify binlog checksums when reading events from the binlog on the master.
  • Commandline: --master-verify-checksum=[0|1]
  • Scope: Global
  • Access Type: Can be changed dynamically
  • Data Type: bool
  • Default Value: OFF (0)

max_binlog_cache_size

  • Description: Restricts the size in bytes used to cache a multi-transactional query. If more bytes are required, a Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage error is generated. If the value is changed, current sessions are unaffected, only sessions started subsequently. See max_binlog_stmt_cache_size and binlog_cache_size.
  • Commandline: --max-binlog-cache-size=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 18446744073709547520
  • Range: 4096 to 18446744073709547520

max_binlog_size

  • Description: 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.
  • Commandline: --max-binlog-size=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 1073741824 (1GB)
  • Range: 4096 to 1073741824 (4KB to 1GB)

max_binlog_stmt_cache_size

  • Description: Restricts the size used to cache non-transactional statements. See max_binlog_cache_size and binlog_stmt_cache_size.
  • Commandline: --max-binlog-stmt-cache-size=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 18446744073709547520 (64 bit), 4294963200 (32 bit)
  • Range: 4096 to 18446744073709547520
  • Introduced: MariaDB 5.5

max_relay_log_size

  • Description: 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.
  • Commandline: --max-relay-log-size=#
  • Scope: Global, Session (from MariaDB 10.0 only)
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 0
  • Range: 0, or 4096 to 1073741824 (4KB to 1GB)

read_binlog_speed_limit

  • Description: 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.
  • Commandline: --read-binlog-speed-limit=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 0 (no limit)
  • Range: 0 to 18446744073709551615
  • Introduced: MariaDB 10.2.3

relay_log

  • Description: Relay log basename. If not set, the basename will be hostname-relay-bin.
  • Commandline: --relay-log=file_name
  • Scope: Global
  • Dynamic: No
  • Data Type: filename
  • Default Value: '' (none)

relay_log_basename

  • Description: The full path of the relay log file names, excluding the extension. Its value is derived from the relay-log variable value.
  • Commandline: No commandline option
  • Scope: Global
  • Dynamic: No
  • Data Type: string
  • Read Only: Yes
  • Introduced: MariaDB 10.1.6

relay_log_index

  • Description: 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.
  • Commandline: --relay-log-index=name
  • Scope: Global
  • Dynamic: No
  • Data Type: string

relay_log_info_file

  • Description: Name and location of the file where the RELAY_LOG_FILE and RELAY_LOG_POS options (i.e. the relay log position) for the CHANGE MASTER statement are written. The slave's SQL thread keeps this relay log position updated as it applies events.
  • Commandline: --relay-log-info-file=file_name
  • Scope: Global
  • Dynamic: No
  • Data Type: string
  • Default Value: relay-log.info

relay_log_purge

  • Description: If set to 1 (the default), relay logs will be purged as soon as they are no longer necessary.
  • Commandline: --relay-log-purge={0|1}
  • Scope: Global
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: ON
  • Note: In MySQL and in MariaDB before version 10.0.8 this variable was silently changed if you did CHANGE MASTER.

relay_log_recovery

  • Description: If set to 1 (0 is default), on startup 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 should always be set together with relay_log_purge. Setting relay-log-recovery=1 with relay-log-purge=0 can cause the relay log to be read from files that were not purged, leading to data inconsistencies.
  • Commandline: --relay-log-recovery
  • Scope: Global
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: OFF

relay_log_space_limit

  • Description: 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.
  • Commandline: --relay-log-space-limit=#
  • Scope: Global
  • Dynamic: No
  • Data Type: numeric
  • Default Value: 0
  • Range - 32 bit: 0 to 4294967295
  • Range - 64 bit: 0 to 18446744073709547520

replicate_annotate_row_events

  • Description: 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.
  • Commandline: --replicate-annotate-row-events
  • Scope: Global
  • Dynamic: No
  • Data Type: boolean
  • Default Value:

replicate_do_db

  • Description: This system variable allows you to configure a replication slave to apply statements and transactions affecting databases that match a specified name.
    • This system variable will not work with cross-database updates with statement-based logging. See the Statement-Based Logging section for more information.
    • When setting it dynamically with SET GLOBAL, the system variable accepts a comma-separated list of filters.
    • When setting it on the command-line or in a server option group in an option file, the system variable does not accept a comma-separated list. If you would like to specify multiple filters, then you need to specify the system variable multiple times.
    • See Replication Filters for more information.
  • Commandline: --replicate-do-db=name
  • Scope: Global
  • Dynamic: Yes
  • Data Type: string
  • Default Value: '' (empty)
  • Introduced: MariaDB 5.5.22 (as a variable)

replicate_do_table

  • Description: This system variable allows you to configure a replication slave to apply statements and transactions that affect tables that match a specified name. The table name is specified in the format: dbname.tablename.
    • This system variable will not work with cross-database updates with statement-based logging. See the Statement-Based Logging section for more information.
    • When setting it dynamically with SET GLOBAL, the system variable accepts a comma-separated list of filters.
    • When setting it on the command-line or in a server option group in an option file, the system variable does not accept a comma-separated list. If you would like to specify multiple filters, then you need to specify the system variable multiple times.
    • See Replication Filters for more information.
  • Commandline: --replicate-do-table=name
  • Scope: Global
  • Dynamic: Yes
  • Data Type: string
  • Default Value: '' (empty)
  • Introduced: MariaDB 5.5.22 (as a variable)

replicate_events_marked_for_skip

  • Description: Tells the slave whether to replication events that are marked with the @@skip_replication flag. See Selectively skipping replication of binlog events for more information.
  • Commandline: --replicate-events-marked-for-skip
  • Scope: Global
  • Dynamic: Yes
  • Data Type: enumeration
  • Default Value: replicate
  • Valid Values: REPLICATE, FILTER_ON_SLAVE, FILTER_ON_MASTER
  • Introduced: MariaDB 5.5.21

replicate_ignore_db

  • Description: This system variable allows you to configure a replication slave to ignore statements and transactions affecting databases that match a specified name.
    • This system variable will not work with cross-database updates with statement-based logging. See the Statement-Based Logging section for more information.
    • When setting it dynamically with SET GLOBAL, the system variable accepts a comma-separated list of filters.
    • When setting it on the command-line or in a server option group in an option file, the system variable does not accept a comma-separated list. If you would like to specify multiple filters, then you need to specify the system variable multiple times.
    • See Replication Filters for more information.
  • Commandline: --replicate-ignore-db=name
  • Scope: Global
  • Dynamic: Yes
  • Data Type: string
  • Default Value: '' (empty)
  • Introduced: MariaDB 5.5.22 (as a variable)

replicate_ignore_table

  • Description: This system variable allows you to configure a replication slave to ignore statements and transactions that affect tables that match a specified name. The table name is specified in the format: dbname.tablename.
    • This system variable will not work with cross-database updates with statement-based logging. See the Statement-Based Logging section for more information.
    • When setting it dynamically with SET GLOBAL, the system variable accepts a comma-separated list of filters.
    • When setting it on the command-line or in a server option group in an option file, the system variable does not accept a comma-separated list. If you would like to specify multiple filters, then you need to specify the system variable multiple times.
    • See Replication Filters for more information.
  • Commandline: --replicate-ignore-table=name
  • Scope: Global
  • Dynamic: Yes
  • Data Type: string
  • Default Value: '' (empty)
  • Introduced: MariaDB 5.5.22 (as a variable)

replicate_rewrite_db


replicate_wild_do_table

  • Description: This system variable allows you to configure a replication slave to apply statements and transactions that affect tables that match a specified wildcard pattern. The wildcard pattern uses the same semantics as the LIKE operator.
    • This system variable will work with cross-database updates with statement-based logging. See the Statement-Based Logging section for more information.
    • When setting it dynamically with SET GLOBAL, the system variable accepts a comma-separated list of filters.
    • When setting it on the command-line or in a server option group in an option file, the system variable does not accept a comma-separated list. If you would like to specify multiple filters, then you need to specify the system variable multiple times.
    • See Replication Filters for more information.
  • Commandline: --replicate-wild-do-table=name
  • Scope: Global
  • Dynamic: Yes
  • Data Type: string
  • Default Value: '' (empty)
  • Introduced: MariaDB 5.5.22 (as a variable)

replicate_wild_ignore_table

  • Description: This system variable allows you to configure a replication slave to ignore statements and transactions that affect tables that match a specified wildcard pattern. The wildcard pattern uses the same semantics as the LIKE operator.
    • This system variable will work with cross-database updates with statement-based logging. See the Statement-Based Logging section for more information.
    • When setting it dynamically with SET GLOBAL, the system variable accepts a comma-separated list of filters.
    • When setting it on the command-line or in a server option group in an option file, the system variable does not accept a comma-separated list. If you would like to specify multiple filters, then you need to specify the system variable multiple times.
    • See Replication Filters for more information.
  • Commandline: --replicate-wild-ignore-table=name
  • Scope: Global
  • Dynamic: Yes
  • Data Type: string
  • Default Value: '' (empty)
  • Introduced: MariaDB 5.5.22 (as a variable)

report_host

  • Description: 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.
  • Commandline: --report-host=host_name
  • Scope: Global
  • Dynamic: No
  • Data Type: string

report_password

  • Description: 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.
  • Commandline: --report-password=password
  • Scope: Global
  • Dynamic: No
  • Data Type: string

report_port

  • Description: 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.
  • Commandline: --report-port=#
  • Scope: Global
  • Dynamic: No
  • Data Type: numeric
  • Default Value: 0
  • Range: 0 to 65535

report_user

  • Description: 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.
  • Commandline: --report-user=name
  • Scope: Global
  • Dynamic: No
  • Data Type: string

server_id


skip_parallel_replication

  • Description: 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.
  • Commandline: None
  • Scope: Session
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: OFF
  • Introduced: MariaDB 10.1.3

skip_replication

  • Description: 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.
  • Commandline: None
  • Scope: Session
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: OFF
  • Introduced: MariaDB 5.5.21

slave_compressed_protocol

  • Description: If set to 1 (0 is the default), will use compression for the slave/master protocol if both master and slave support this.
  • Commandline: --slave-compressed-protocol
  • Scope: Global
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: 0

slave_ddl_exec_mode

  • Description: 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.
  • Commandline: --slave-ddl-exec-mode=name
  • Scope: Global
  • Dynamic: Yes
  • Data Type: enumeration
  • Default Value: IDEMPOTENT
  • Valid Values: IDEMPOTENT, STRICT
  • Introduced: MariaDB 10.0.8

slave_domain_parallel_threads

  • Description: 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.
  • Commandline: --slave-domain-parallel-threads=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 0
  • Valid Values: 0 to 16383
  • Introduced: MariaDB 10.0.9

slave_exec_mode

  • Description: 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.
  • Scope: Global
  • Dynamic: Yes
  • Data Type: enumeration
  • Default Value: IDEMPOTENT (NDB), STRICT (All)
  • Valid Values: IDEMPOTENT, STRICT

slave_load_tmpdir

  • Description: 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.
  • Commandline: --slave-load-tmpdir=path
  • Scope: Global
  • Dynamic: No
  • Data Type: file name
  • Default Value: /tmp

slave_max_allowed_packet

  • Description: 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
  • Commandline: --slave-max-allowed-packet=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 1073741824
  • Range: 1024 to 1073741824
  • Introduced: MariaDB 5.5.26

slave_net_timeout

  • Description: 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 option. The first reconnect attempt takes place immediately.
  • Commandline: --slave-net-timeout=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value:
  • Range: 1 upwards

slave_parallel_max_queued


slave_parallel_mode

  • Description: 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 maximize the parallelism, possibly at the cost of increased conflict rate.
    • minimal: only parallelizes the commit steps of transactions.
    • none disables parallel apply completely.
  • Commandline: None
  • Scope: Global
  • Dynamic: Yes
  • Dynamic:
  • Data Type: enum
  • Default Value: optimistic (>= MariaDB 10.5.1), conservative (<= MariaDB 10.5.0)
  • Valid Values: conservative, optimistic, none, aggressive and minimal
  • Introduced: MariaDB 10.1.3

slave_parallel_threads


slave_parallel_workers


slave_run_triggers_for_rbr


slave_skip_errors

  • Description: 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. A count of these is kept in slave_skipped_errors.
  • Commandline: --slave-skip-errors=[error_code1,error_code2,...|all|ddl_exist_errors]
  • Scope: Global
  • Dynamic: No
  • Data Type: string
  • Default Value: OFF
  • Valid Values: [list of error codes], ALL, OFF

slave_sql_verify_checksum

  • Description: Verify binlog checksums when the slave SQL thread reads events from the relay log.
  • Commandline: --slave-sql-verify-checksum=[0|1]
  • Scope: Global
  • Access Type: Can be changed dynamically
  • Data Type: bool
  • Default Value: ON (1)

slave_transaction_retries

  • Description: 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.
  • Commandline: --slave-transaction-retries=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 10
  • Range - 32 bit: 0 to 4294967295
  • Range - 64 bit: 0 to 18446744073709547520

slave_transaction_retry_errors

  • Description: When an error occurs during a transaction on the slave, replication usually halts. By default, transactions that caused a deadlock or elapsed lock wait timeout will be retried. One can add other errors to the the list of errors that should be retried by adding a comma-separated list of error numbers to this variable. This is particularly useful in some Spider setups. Some recommended errors to retry for Spider are 1158,1159,1160,1161,1429,2013,12701.(From MariaDB 10.4.5, these are in the default value)
  • Commandline: --slave-transaction_retry-errors=[error_code1,error_code2,...]
  • Scope: Global
  • Dynamic: No
  • Data Type: string
  • Default Value:
  • Valid Values: comma-separated list of error codes
  • Introduced: MariaDB 10.3.3

slave_transaction_retry_interval

  • Description: Interval in seconds for the slave SQL thread to retry a failed transaction due to a deadlock, elapsed lock wait timeout or an error listed in slave_transaction_retry_errors. The interval is calculated as max(slave_transaction_retry_interval, min(retry_count, 5)).
  • Commandline: --slave-transaction-retry-interval=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 0
  • Range: 0 to 3600
  • Introduced: MariaDB 10.3.3

slave_type_conversions

  • Description: 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.
  • Commandline: --slave-type-conversions=set
  • Scope: Global
  • Dynamic: Yes
  • Data Type: set
  • Default Value: Empty variable
  • Valid Values: ALL_LOSSY, ALL_NON_LOSSY, empty
  • Introduced: MariaDB 5.5

sql_log_bin

  • Description: 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.
  • Scope: Global (before MariaDB 10.0.16 and MariaDB 5.5.41 only), Session
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: 1

sql_slave_skip_counter

  • Description: 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.
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 0

sync_binlog

  • Description: 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.
  • Commandline: --sync-binlog=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 0
  • Range: 0 to 4294967295

sync_master_info

  • Description: 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.
  • Commandline: --sync-master-info=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 10000 (>= MariaDB 10.1.7), 0 (<= MariaDB 10.1.6)

sync_relay_log

  • Description: 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.
  • Commandline: --sync-relay-log=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 10000 (>= MariaDB 10.1.7), 0 (<= MariaDB 10.1.6)

sync_relay_log_info

  • Description: 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.
  • Commandline: --sync-relay-log-info=#
  • Scope: Global,
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 10000 (>= MariaDB 10.1.7), 0 (<= MariaDB 10.1.6)
  • Range: 0 to 4294967295

Comments

Comments loading...
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.