## Enabling the InnoDB memcached Binary Log 

1. To use the daemon_memcached  plugin with the MySQL binary log, enable the innodb_api_enable_binlog  configuration option on the source server. This option can only be set at server startup. You must also enable the MySQL binary log on the source server using the --log- bin  option. You can add these options to the MySQL configuration file, or on the mysqld  command line. 

mysqld ... --log-bin -–innodb_api_enable_binlog=1 

2. Configure the source and replica server, as described in Section 17.1.2, “Setting Up Binary Log File Position Based Replication” . 

3. Use mysqldump  to create a source data snapshot, and sync the snapshot to the replica server. 

source shell> mysqldump --all-databases --lock-all-tables > dbdump.db replica shell> mysql < dbdump.db 

4. On the source server, issue SHOW MASTER STATUS  to obtain the source binary log coordinates. 

mysql> SHOW MASTER STATUS; 

5. On the replica server, use a CHANGE REPLICATION SOURCE TO  statement (from MySQL 8.0.23) or CHANGE MASTER TO  statement (before MySQL 8.0.23) to set up a replica server using the source binary log coordinates. 

mysql> CHANGE MASTER TO MASTER_HOST=’localhost’, MASTER_USER=’root’, MASTER_PASSWORD=’’, MASTER_PORT = 13000, MASTER_LOG_FILE=’0.000001, MASTER_LOG_POS=114; Or from MySQL 8.0.23: mysql> CHANGE REPLICATION SOURCE TO SOURCE_HOST=’localhost’, SOURCE_USER=’root’, SOURCE_PASSWORD=’’, SOURCE_PORT = 13000, SOURCE_LOG_FILE=’0.000001, SOURCE_LOG_POS=114; 

6. Start the replica. 

mysql> START SLAVE; Or from MySQL 8.0.22: mysql> START REPLICA; 

If the error log prints output similar to the following, the replica is ready for replication. 

## Testing the InnoDB memcached Replication Configuration 

2013-09-24T13:04:38.639684Z 49 [Note] Replication I/O thread: connected to source ’root@localhost:13000’, replication started in log ’0.000001’ at position 114 

This example demonstrates how to test the InnoDB memcached  replication configuration using the memcached  and telnet to insert, update, and delete data. A MySQL client is used to verify results on the source and replica servers. 

