5-Slave registration

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

The slave server, when properly configured with CHANGE MASTER TO ...
can start the MariaDB replication with the command START SLAVE

After authentication, some COM_QUERY packets are exchanged before sending
COM_REGISTER_SLAVE and COM_BINLOG_DUMP

The following COM_QUERY packets com from MariaDB 10.X slave using GTID

  • SELECT UNIX_TIMESTAMP()
  • SHOW VARIAB LES LIKE 'SERVER_ID'
  • SET @master_heartbeat_period= 30000001024
  • SET @master_binlog_checksum= @@global.binlog_checksum
  • SELECT @master_binlog_checksum
  • SET @mariadb_slave_capability=4
  • SELECT @@GLOBAL.gtid_domain_id
  • SET @slave_connect_state='0-10201-9868'
  • SET @slave_gtid_strict_mode=0
  • SET @slave_gtid_ignore_duplicates=0

Then COM_REGISTER_SLAVE completes the registration.

The COM_BINLOG_DUMP marks the request of binlog events stream

Note

If semi-sync is in use, the request for this protocol change is sent between COM_REGISTER_SLAVE and COM_BINLOG_DUMP

Example with COM_REGISTER_SLAVE, semi-Sync and COM_BINLOG_DUMP

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.