Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 37.9Mb
PDF (A4) - 37.9Mb
PDF (RPM) - 36.6Mb
HTML Download (TGZ) - 9.9Mb
HTML Download (Zip) - 9.9Mb
HTML Download (RPM) - 8.7Mb
Man Pages (TGZ) - 207.0Kb
Man Pages (Zip) - 315.4Kb
Info (Gzip) - 3.5Mb
Info (Zip) - 3.5Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  Replication and Binary Logging Option and Variable Reference

16.1.6.1 Replication and Binary Logging Option and Variable Reference

The following lists provide basic information about the MySQL command-line options and system variables applicable to replication and the binary log.

  • abort-slave-event-count: DESCRIPTION: Option used by mysql-test for debugging and testing of replication

  • binlog_gtid_simple_recovery: DESCRIPTION: Controls how binary logs are iterated during GTID recovery

  • Com_change_master: DESCRIPTION: Count of CHANGE MASTER TO statements

  • Com_show_master_status: DESCRIPTION: Count of SHOW MASTER STATUS statements

  • Com_show_new_master: DESCRIPTION: Count of SHOW NEW MASTER statements

  • Com_show_slave_hosts: DESCRIPTION: Count of SHOW SLAVE HOSTS statements

  • Com_show_slave_status: DESCRIPTION: Count of SHOW SLAVE STATUS statements

  • Com_show_slave_status_nonblocking: DESCRIPTION: Count of SHOW SLAVE STATUS NONBLOCKING statements

  • Com_slave_start: DESCRIPTION: Count of START SLAVE statements

  • Com_slave_stop: DESCRIPTION: Count of STOP SLAVE statements

  • disconnect-slave-event-count: DESCRIPTION: Option used by mysql-test for debugging and testing of replication

  • enforce-gtid-consistency: DESCRIPTION: Prevents execution of statements that cannot be logged in a transactionally safe manner

  • enforce_gtid_consistency: DESCRIPTION: Prevents execution of statements that cannot be logged in a transactionally safe manner

  • executed-gtids-compression-period: DESCRIPTION: Deprecated and will be removed in a future version; use the renamed gtid-executed-compression-period instead

  • executed_gtids_compression_period: DESCRIPTION: Deprecated and will be removed in a future version; use the renamed gtid_executed_compression_period instead

  • gtid-executed-compression-period: DESCRIPTION: 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: DESCRIPTION: Controls whether GTID based logging is enabled and what type of transactions the logs can contain

  • gtid_executed: DESCRIPTION: Global: All GTIDs in the binary log (global) or current transaction (session). Read-only.

  • gtid_executed_compression_period: DESCRIPTION: 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: DESCRIPTION: Controls whether GTID based logging is enabled and what type of transactions the logs can contain

  • gtid_next: DESCRIPTION: Specifies the GTID for the next statement to execute; see documentation for details

  • gtid_owned: DESCRIPTION: 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: DESCRIPTION: The set of all GTIDs that have been purged from the binary log

  • init_slave: DESCRIPTION: Statements that are executed when a slave connects to a master

  • log-slave-updates: DESCRIPTION: Tells the slave to log the updates performed by its SQL thread to its own binary log

  • log_slave_updates: DESCRIPTION: Whether the slave should log the updates performed by its SQL thread to its own binary log. Read-only; set using the --log-slave-updates server option.

  • log_statements_unsafe_for_binlog: DESCRIPTION: Disables error 1592 warnings being written to the error log

  • master-info-file: DESCRIPTION: The location and name of the file that remembers the master and where the I/O replication thread is in the master's binary logs

  • master-info-repository: DESCRIPTION: Whether to write master status information and replication I/O thread location in the master's binary logs to a file or table

  • master-retry-count: DESCRIPTION: Number of tries the slave makes to connect to the master before giving up

  • master_info_repository: DESCRIPTION: Whether to write master status information and replication I/O thread location in the master's binary logs to a file or table

  • relay-log: DESCRIPTION: The location and base name to use for relay logs

  • relay-log-index: DESCRIPTION: The location and name to use for the file that keeps a list of the last relay logs

  • relay-log-info-file: DESCRIPTION: The location and name of the file that remembers where the SQL replication thread is in the relay logs

  • relay-log-info-repository: DESCRIPTION: Whether to write the replication SQL thread's location in the relay logs to a file or a table

  • relay-log-recovery: DESCRIPTION: Enables automatic recovery of relay log files from master at startup

  • relay_log_basename: DESCRIPTION: Complete path to relay log, including filename

  • relay_log_index: DESCRIPTION: The name of the relay log index file

  • relay_log_info_file: DESCRIPTION: The name of the file in which the slave records information about the relay logs

  • relay_log_info_repository: DESCRIPTION: Whether to write the replication SQL thread's location in the relay logs to a file or a table

  • relay_log_purge: DESCRIPTION: Determines whether relay logs are purged

  • relay_log_recovery: DESCRIPTION: Whether automatic recovery of relay log files from master at startup is enabled; must be enabled for a crash-safe slave

  • relay_log_space_limit: DESCRIPTION: Maximum space to use for all relay logs

  • replicate-do-db: DESCRIPTION: Tells the slave SQL thread to restrict replication to the specified database

  • replicate-do-table: DESCRIPTION: Tells the slave SQL thread to restrict replication to the specified table

  • replicate-ignore-db: DESCRIPTION: Tells the slave SQL thread not to replicate to the specified database

  • replicate-ignore-table: DESCRIPTION: Tells the slave SQL thread not to replicate to the specified table

  • replicate-rewrite-db: DESCRIPTION: Updates to a database with a different name than the original

  • replicate-same-server-id: DESCRIPTION: In replication, if set to 1, do not skip events having our server id

  • replicate-wild-do-table: DESCRIPTION: Tells the slave thread to restrict replication to the tables that match the specified wildcard pattern

  • replicate-wild-ignore-table: DESCRIPTION: Tells the slave thread not to replicate to the tables that match the given wildcard pattern

  • report-host: DESCRIPTION: Host name or IP of the slave to be reported to the master during slave registration

  • report-password: DESCRIPTION: An arbitrary password that the slave server should report to the master. Not the same as the password for the MySQL replication user account.

  • report-port: DESCRIPTION: Port for connecting to slave reported to the master during slave registration

  • report-user: DESCRIPTION: An arbitrary user name that a slave server should report to the master. Not the same as the name used with the MySQL replication user account.

  • Rpl_semi_sync_master_clients: DESCRIPTION: Number of semisynchronous slaves

  • rpl_semi_sync_master_enabled: DESCRIPTION: Whether semisynchronous replication is enabled on the master

  • Rpl_semi_sync_master_net_avg_wait_time: DESCRIPTION: The average time the master waited for a slave reply

  • Rpl_semi_sync_master_net_wait_time: DESCRIPTION: The total time the master waited for slave replies

  • Rpl_semi_sync_master_net_waits: DESCRIPTION: The total number of times the master waited for slave replies

  • Rpl_semi_sync_master_no_times: DESCRIPTION: Number of times the master turned off semisynchronous replication

  • Rpl_semi_sync_master_no_tx: DESCRIPTION: Number of commits not acknowledged successfully

  • Rpl_semi_sync_master_status: DESCRIPTION: Whether semisynchronous replication is operational on the master

  • Rpl_semi_sync_master_timefunc_failures: DESCRIPTION: Number of times the master failed when calling time functions

  • rpl_semi_sync_master_timeout: DESCRIPTION: Number of milliseconds to wait for slave acknowledgment

  • rpl_semi_sync_master_trace_level: DESCRIPTION: The semisynchronous replication debug trace level on the master

  • Rpl_semi_sync_master_tx_avg_wait_time: DESCRIPTION: The average time the master waited for each transaction

  • Rpl_semi_sync_master_tx_wait_time: DESCRIPTION: The total time the master waited for transactions

  • Rpl_semi_sync_master_tx_waits: DESCRIPTION: The total number of times the master waited for transactions

  • rpl_semi_sync_master_wait_for_slave_count: DESCRIPTION: How many slave acknowledgments the master must receive per transaction before proceeding

  • rpl_semi_sync_master_wait_no_slave: DESCRIPTION: Whether master waits for timeout even with no slaves

  • rpl_semi_sync_master_wait_point: DESCRIPTION: The wait point for slave transaction receipt acknowledgment

  • Rpl_semi_sync_master_wait_pos_backtraverse: DESCRIPTION: The total number of times the master waited for an event with binary coordinates lower than events waited for previously

  • Rpl_semi_sync_master_wait_sessions: DESCRIPTION: Number of sessions currently waiting for slave replies

  • Rpl_semi_sync_master_yes_tx: DESCRIPTION: Number of commits acknowledged successfully

  • rpl_semi_sync_slave_enabled: DESCRIPTION: Whether semisynchronous replication is enabled on slave

  • Rpl_semi_sync_slave_status: DESCRIPTION: Whether semisynchronous replication is operational on slave

  • rpl_semi_sync_slave_trace_level: DESCRIPTION: The semisynchronous replication debug trace level on the slave

  • rpl_stop_slave_timeout: DESCRIPTION: Set the number of seconds that STOP SLAVE waits before timing out

  • server_uuid: DESCRIPTION: The server's globally unique ID, automatically (re)generated at server start

  • show-slave-auth-info: DESCRIPTION: Show user name and password in SHOW SLAVE HOSTS on this master

  • simplified_binlog_gtid_recovery: DESCRIPTION: Controls how binary logs are iterated during GTID recovery

  • skip-slave-start: DESCRIPTION: If set, slave is not autostarted

  • slave-checkpoint-group: DESCRIPTION: Maximum number of transactions processed by a multithreaded slave before a checkpoint operation is called to update progress status. Not supported by NDB Cluster.

  • slave-checkpoint-period: DESCRIPTION: Update progress status of multithreaded slave and flush relay log info to disk after this number of milliseconds. Not supported by NDB Cluster.

  • slave-load-tmpdir: DESCRIPTION: The location where the slave should put its temporary files when replicating a LOAD DATA INFILE statement

  • slave-max-allowed-packet: DESCRIPTION: Maximum size, in bytes, of a packet that can be sent from a replication master to a slave; overrides max_allowed_packet

  • slave_net_timeout: DESCRIPTION: Number of seconds to wait for more data from a master/slave connection before aborting the read

  • slave-parallel-type: DESCRIPTION: Tells the slave to use timestamp information (LOGICAL_CLOCK) or database partioning (DATABASE) to parallelize transactions. The default is LOGICAL_CLOCK.

  • slave-parallel-workers: DESCRIPTION: Number of applier threads for executing replication transactions in parallel. The default is 4 applier threads. Set to 0 to disable slave multithreading. Not supported by MySQL Cluster.

  • slave-pending-jobs-size-max: DESCRIPTION: Maximum size of slave worker queues holding events not yet applied

  • slave-rows-search-algorithms: DESCRIPTION: Determines search algorithms used for slave update batching. Any 2 or 3 from the list INDEX_SEARCH, TABLE_SCAN, HASH_SCAN

  • slave-skip-errors: DESCRIPTION: Tells the slave thread to continue replication when a query returns an error from the provided list

  • slave_checkpoint_group: DESCRIPTION: Maximum number of transactions processed by a multithreaded slave before a checkpoint operation is called to update progress status. Not supported by NDB Cluster.

  • slave_checkpoint_period: DESCRIPTION: Update progress status of multithreaded slave and flush relay log info to disk after this number of milliseconds. Not supported by NDB Cluster.

  • slave_compressed_protocol: DESCRIPTION: Use compression on master/slave protocol

  • slave_exec_mode: DESCRIPTION: Allows for switching the slave 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: DESCRIPTION: The slave's replication heartbeat interval, in seconds

  • slave_max_allowed_packet: DESCRIPTION: Maximum size, in bytes, of a packet that can be sent from a replication master to a slave; overrides max_allowed_packet

  • Slave_open_temp_tables: DESCRIPTION: Number of temporary tables that the slave SQL thread currently has open

  • slave_parallel_type: DESCRIPTION: Tells the slave to use timestamp information (LOGICAL_CLOCK) or database partioning (DATABASE) to parallelize transactions.

  • slave_parallel_workers: DESCRIPTION: Number of applier threads for executing replication transactions in parallel. A value of 0 disables slave multithreading. Not supported by MySQL Cluster.

  • slave_pending_jobs_size_max: DESCRIPTION: Maximum size of slave worker queues holding events not yet applied

  • slave_preserve_commit_order: DESCRIPTION: Ensures that all commits by slave workers happen in the same order as on the master to maintain consistency when using parallel applier threads.

  • Slave_retried_transactions: DESCRIPTION: The total number of times since startup that the replication slave SQL thread has retried transactions

  • slave_rows_search_algorithms: DESCRIPTION: Determines search algorithms used for slave update batching. Any 2 or 3 from the list INDEX_SEARCH, TABLE_SCAN, HASH_SCAN.

  • Slave_rows_last_search_algorithm_used: DESCRIPTION: Search algorithm most recently used by this slave to locate rows for row-based replication (index, table, or hash scan)

  • Slave_running: DESCRIPTION: The state of this server as a replication slave (slave I/O thread status)

  • slave_transaction_retries: DESCRIPTION: Number of times the slave 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: DESCRIPTION: Controls type conversion mode on replication slave. 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 master and slave.

  • sql_slave_skip_counter: DESCRIPTION: Number of events from the master that a slave server should skip. Not compatible with GTID replication.

  • sync_binlog: DESCRIPTION: Synchronously flush binary log to disk after every #th event

  • sync_master_info: DESCRIPTION: Synchronize master.info to disk after every #th event

  • sync_relay_log: DESCRIPTION: Synchronize relay log to disk after every #th event

  • sync_relay_log_info: DESCRIPTION: Synchronize relay.info file to disk after every #th event

Section 16.1.6.2, “Replication Master Options and Variables”, provides more detailed information about options and variables relating to replication master servers. For more information about options and variables relating to replication slaves, see Section 16.1.6.3, “Replication Slave Options and Variables”.

Section 16.1.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 Section 5.4.4, “The Binary Log”.

For information about the sql_log_bin and sql_log_off variables, see Section 5.1.7, “Server System Variables”.

For a lsiting with all command-line options, system and status variables used with mysqld, see Section 5.1.3, “Server Option, System Variable, and Status Variable Reference”.


User Comments
Sign Up Login You must be logged in to post a comment.