The following two sections provide basic information about the MySQL command-line options and system variables applicable to replication and the binary log.
The command-line options and system variables in the following list relate to replication source servers and replicas. Section 2.6.2, “Replication Source Options and Variables” provides more detailed information about options and variables relating to replication source servers. For more information about options and variables relating to replicas, see Section 2.6.3, “Replica Server Options and Variables”.
abort-slave-event-count: Option used by mysql-test for debugging and testing of replication.
auto_increment_increment: AUTO_INCREMENT columns are incremented by this value.
auto_increment_offset: Offset added to AUTO_INCREMENT columns.
binlog_gtid_simple_recovery: Controls how binary logs are iterated during GTID recovery.
Com_change_master: Count of CHANGE MASTER TO statements.
Com_show_master_status: Count of SHOW MASTER STATUS statements.
Com_show_slave_hosts: Count of SHOW REPLICAS and SHOW SLAVE HOSTS statements.
Com_show_slave_status: Count of SHOW REPLICA STATUS and SHOW SLAVE STATUS statements.
Com_slave_start: Count of START REPLICA and START SLAVE statements.
Com_slave_stop: Count of STOP REPLICA and STOP SLAVE statements.
disconnect-slave-event-count: Option used by mysql-test for debugging and testing of replication.
enforce_gtid_consistency: Prevents execution of statements that cannot be logged in a transactionally safe manner.
expire_logs_days: Purge binary logs after this many days.
gtid_executed: Global: All GTIDs in the binary log (global) or current transaction (session). Read-only.
gtid_executed_compression_period: Compress gtid_executed table each time this many transactions have occurred. 0 means never compress this table. Applies only when binary logging is disabled.
gtid_mode: Controls whether GTID based logging is enabled and what type of transactions the logs can contain.
gtid_next: Specifies the GTID for the next statement to execute; see documentation for details.
gtid_owned: The set of GTIDs owned by this client (session), or by all clients, together with the thread ID of the owner (global). Read-only.
gtid_purged: The set of all GTIDs that have been purged from the binary log.
init_slave: Statements that are executed when a replica connects to a source.
log_bin_trust_function_creators: If equal to 0 (the default), then when --log-bin is used, creation of a stored function is allowed only to users having the SUPER privilege and only if the function created does not break binary logging.
log_builtin_as_identified_by_password: Whether to log CREATE/ALTER USER, GRANT in backward-compatible fashion.
log_statements_unsafe_for_binlog: Disables error 1592 warnings being written to the error log.
master-info-file: The location and name of the file that remembers the source and where the I/O replication thread is in the source's binary log.
master-retry-count: Number of tries the replica makes to connect to the source before giving up.
master_info_repository: Whether to write the connection metadata repository, containing source information and the replication I/O thread location in the source's binary log, to a file or table.
max_relay_log_size: If nonzero, relay log is rotated automatically when its size exceeds this value. If zero, size at which rotation occurs is determined by the value of max_binlog_size.
relay_log: The location and base name to use for relay logs.
relay_log_basename: Complete path to relay log, including file name.
relay_log_index: The location and name to use for the file that keeps a list of the last relay logs.
relay_log_info_file: File name for the applier metadata repository in which the replica records information about the relay logs.
relay_log_info_repository: Whether to write the replication SQL thread's location in the relay logs to a file or a table.
relay_log_purge: Determines whether relay logs are purged.
relay_log_recovery: Whether automatic recovery of relay log files from source at startup is enabled; must be enabled for a crash-safe replica.
relay_log_space_limit: Maximum space to use for all relay logs.
replicate-do-db: Tells the replication SQL thread to restrict replication to the specified database.
replicate-do-table: Tells the replication SQL thread to restrict replication to the specified table.
replicate-ignore-db: Tells the replication SQL thread not to replicate to the specified database.
replicate-ignore-table: Tells the replication SQL thread not to replicate to the specified table.
replicate-rewrite-db: Updates to a database with a different name than the original.
replicate-same-server-id: In replication, if enabled, do not skip events having our server id.
replicate-wild-do-table: Tells the replication SQL thread to restrict replication to the tables that match the specified wildcard pattern.
replicate-wild-ignore-table: Tells the replication SQL thread not to replicate to the tables that match the given wildcard pattern.
report_host: Host name or IP of the replica to be reported to the source during replica registration.
report_password: An arbitrary password that the replica server should report to the source. Not the same as the password for the MySQL replication user account.
report_port: Port for connecting to replica reported to the source during replica registration.
report_user: An arbitrary user name that a replica server should report to the source. Not the same as the name used with the MySQL replication user account.
Rpl_semi_sync_master_clients: Number of semisynchronous replicas.
rpl_semi_sync_master_enabled: Whether semisynchronous replication is enabled on the source.
Rpl_semi_sync_master_net_avg_wait_time: The average time the source waited for a replica reply.
Rpl_semi_sync_master_net_wait_time: The total time the source waited for replica replies.
Rpl_semi_sync_master_net_waits: The total number of times the source waited for replica replies.
Rpl_semi_sync_master_no_times: Number of times the source turned off semisynchronous replication.
Rpl_semi_sync_master_no_tx: Number of commits not acknowledged successfully.
Rpl_semi_sync_master_status: Whether semisynchronous replication is operational on the source.
Rpl_semi_sync_master_timefunc_failures: Number of times the source failed when calling time functions.
rpl_semi_sync_master_timeout: Number of milliseconds to wait for replica acknowledgment.
rpl_semi_sync_master_trace_level: The semisynchronous replication debug trace level on the source.
Rpl_semi_sync_master_tx_avg_wait_time: The average time the source waited for each transaction.
Rpl_semi_sync_master_tx_wait_time: The total time the source waited for transactions.
Rpl_semi_sync_master_tx_waits: The total number of times the source waited for transactions.
rpl_semi_sync_master_wait_for_slave_count: How many replica acknowledgments the source must receive per transaction before proceeding.
rpl_semi_sync_master_wait_no_slave: Whether source waits for timeout even with no replicas.
rpl_semi_sync_master_wait_point: The wait point for replica transaction receipt acknowledgment.
Rpl_semi_sync_master_wait_pos_backtraverse: The total number of times the source waited for an event with binary coordinates lower than events waited for previously.
Rpl_semi_sync_master_wait_sessions: Number of sessions currently waiting for replica replies.
Rpl_semi_sync_master_yes_tx: Number of commits acknowledged successfully.
rpl_semi_sync_slave_enabled: Whether semisynchronous replication is enabled on replica.
Rpl_semi_sync_slave_status: Whether semisynchronous replication is operational on replica.
rpl_semi_sync_slave_trace_level: The semisynchronous replication debug trace level on the replica.
rpl_stop_slave_timeout: Set the number of seconds that STOP REPLICA or STOP SLAVE waits before timing out.
server_uuid: The server's globally unique ID, automatically (re)generated at server start.
show-slave-auth-info: Show user name and password in SHOW REPLICAS and SHOW SLAVE HOSTS on this source.
skip-slave-start: If set, replication is not autostarted when the replica server starts.
slave_load_tmpdir: The location where the replica should put its temporary files when replicating LOAD DATA statements.
slave_net_timeout: Number of seconds to wait for more data from a source/replica connection before aborting the read.
slave-skip-errors: Tells the replication thread to continue replication when a query returns an error from the provided list.
slave_checkpoint_group: Maximum number of transactions processed by a multithreaded replica before a checkpoint operation is called to update progress status. Not supported by NDB Cluster.
slave_checkpoint_period: Update progress status of multithreaded replica and flush relay log info to disk after this number of milliseconds. Not supported by NDB Cluster.
slave_compressed_protocol: Use compression of source/replica protocol.
slave_exec_mode: Allows for switching the replication thread between IDEMPOTENT mode (key and some other errors suppressed) and STRICT mode; STRICT mode is the default, except for NDB Cluster, where IDEMPOTENT is always used.
Slave_heartbeat_period: The replica's replication heartbeat interval, in seconds.
Slave_last_heartbeat: Shows when the latest heartbeat signal was received, in TIMESTAMP format.
slave_max_allowed_packet: Maximum size, in bytes, of a packet that can be sent from a replication source server to a replica; overrides max_allowed_packet.
Slave_open_temp_tables: Number of temporary tables that the replication SQL thread currently has open.
slave_parallel_type: Tells the replica to use timestamp information (LOGICAL_CLOCK) or database partioning (DATABASE) to parallelize transactions.
slave_parallel_workers: Number of applier threads for executing replication transactions in parallel. A value of 0 disables replica multithreading. Not supported by MySQL Cluster.
slave_pending_jobs_size_max: Maximum size of replica worker queues holding events not yet applied.
slave_preserve_commit_order: Ensures that all commits by replica workers happen in the same order as on the source to maintain consistency when using parallel applier threads.
Slave_received_heartbeats: Number of heartbeats received by a replica since previous reset.
Slave_retried_transactions: The total number of times since startup that the replication SQL thread has retried transactions.
slave_rows_search_algorithms: Determines search algorithms used for replica update batching. Any 2 or 3 from the list INDEX_SEARCH, TABLE_SCAN, HASH_SCAN.
Slave_rows_last_search_algorithm_used: Search algorithm most recently used by this replica to locate rows for row-based replication (index, table, or hash scan).
Slave_running: The state of this server as a replica (replication I/O thread status).
slave_transaction_retries: Number of times the replication SQL thread will retry a transaction in case it failed with a deadlock or elapsed lock wait timeout, before giving up and stopping.
slave_type_conversions: Controls type conversion mode on replica. Value is a list of zero or more elements from the list: ALL_LOSSY, ALL_NON_LOSSY. Set to an empty string to disallow type conversions between source and replica.
sql_log_bin: Controls binary logging for the current session.
sql_slave_skip_counter: Number of events from the source that a replica should skip. Not compatible with GTID replication.
sync_master_info: Synchronize master.info to disk after every #th event.
sync_relay_log: Synchronize relay log to disk after every #th event.
sync_relay_log_info: Synchronize relay.info file to disk after every #th event.
transaction_write_set_extraction: Defines the algorithm used to hash the writes extracted during a transaction.
For a listing of all command-line options, system variables, and status variables used with mysqld, see Server Option, System Variable, and Status Variable Reference.
The command-line options and system variables in the following list relate to the binary log. Section 2.6.4, “Binary Logging Options and Variables”, provides more detailed information about options and variables relating to binary logging. For additional general information about the binary log, see The Binary Log.
binlog-checksum: Enable/disable binary log checksums.
binlog-do-db: Limits binary logging to specific databases.
binlog_format: Specifies the format of the binary log.
binlog-ignore-db: Tells the source that updates to the given database should not be logged to the binary log.
binlog-row-event-max-size: Binary log max event size.
Binlog_cache_disk_use: Number of transactions that used a temporary file instead of the binary log cache.
binlog_cache_size: Size of the cache to hold the SQL statements for the binary log during a transaction.
Binlog_cache_use: Number of transactions that used the temporary binary log cache.
binlog_checksum: Enable/disable binary log checksums.
binlog_direct_non_transactional_updates: Causes updates using statement format to nontransactional engines to be written directly to binary log. See documentation before using.
binlog_error_action: Controls what happens when the server cannot write to the binary log.
binlog_group_commit_sync_delay: Sets the number of microseconds to wait before synchronizing transactions to disk.
binlog_group_commit_sync_no_delay_count: Sets the maximum number of transactions to wait for before aborting the current delay specified by binlog_group_commit_sync_delay.
binlog_max_flush_queue_time: How long to read transactions before flushing to binary log.
binlog_order_commits: Whether to commit in same order as writes to binary log.
binlog_row_image: Use full or minimal images when logging row changes.
binlog_rows_query_log_events: When enabled, enables logging of rows query log events when using row-based logging. Disabled by default. Do not enable when producing logs for pre-5.6 replicas/readers.
Binlog_stmt_cache_disk_use: Number of nontransactional statements that used a temporary file instead of the binary log statement cache.
binlog_stmt_cache_size: Size of the cache to hold nontransactional statements for the binary log during a transaction.
Binlog_stmt_cache_use: Number of statements that used the temporary binary log statement cache.
binlog_transaction_dependency_tracking: Source of dependency information (commit timestamps or transaction write sets) from which to assess which transactions can be executed in parallel by replica's multithreaded applier.
binlog_transaction_dependency_history_size: Number of row hashes kept for looking up transaction that last updated some row.
Com_show_binlog_events: Count of SHOW BINLOG EVENTS statements.
Com_show_binlogs: Count of SHOW BINLOGS statements.
log-bin: Specifies the base name for binary log files.
log-bin-index: Specifies the name for the binary log index file.
log_bin: Whether the binary log is enabled.
log_bin_basename: Path and base name for binary log files.
log_bin_use_v1_row_events: Whether server is using version 1 binary log row events.
log_slave_updates: Whether the replica should log the updates performed by its replication SQL thread to its own binary log.
master_verify_checksum: Cause source to examine checksums when reading from the binary log.
max-binlog-dump-events: Option used by mysql-test for debugging and testing of replication.
max_binlog_cache_size: Can be used to restrict the total size used to cache a multi-statement transaction.
max_binlog_size: Binary log will be rotated automatically when size exceeds this value.
max_binlog_stmt_cache_size: Can be used to restrict the total size used to cache all nontransactional statements during a transaction.
slave-sql-verify-checksum: Cause replica to examine checksums when reading from the relay log.
slave_sql_verify_checksum: Cause replica to examine checksums when reading from relay log.
sporadic-binlog-dump-fail: Option used by mysql-test for debugging and testing of replication.
sync_binlog: Synchronously flush binary log to disk after every #th event.
For a listing of all command-line options, system and status variables used with mysqld, see Server Option, System Variable, and Status Variable Reference.