#Master [mysqld] pid-file = /export/umesh/server/binaries/mysql-5.7.11/run/master.pid socket = /export/umesh/server/binaries/mysql-5.7.11/run/master.sock log-error=/export/umesh/server/binaries/mysql-5.7.11/log/master.log slow_query_log_file=/export/umesh/server/binaries/mysql-5.7.11/log/slow.log general_log_file=/export/umesh/server/binaries/mysql-5.7.11/log/general.log port = 15000 server-id = 1 basedir = /export/umesh/server/binaries/mysql-5.7.11 datadir = /export/umesh/server/binaries/mysql-5.7.11/master tmpdir = /tmp log-bin = /export/umesh/server/binaries/mysql-5.7.11/log/master-bin log-bin-index = /export/umesh/server/binaries/mysql-5.7.11/log/master-bin.index binlog_format=ROW #Slave [mysqld] pid-file = /export/umesh/server/binaries/mysql-5.7.11/run/slave.pid socket = /export/umesh/server/binaries/mysql-5.7.11/run/slave.sock log-error=/export/umesh/server/binaries/mysql-5.7.11/log/slave.log port = 15001 server-id = 2 basedir = /export/umesh/server/binaries/mysql-5.7.11 datadir = /export/umesh/server/binaries/mysql-5.7.11/slave tmpdir = /tmp relay-log-index = /export/umesh/server/binaries/mysql-5.7.11/log/slave-relay-bin.index relay-log = /export/umesh/server/binaries/mysql-5.7.11/log/slave-relay-bin binlog_format=ROW log_slow_slave_statements=ON slow_query_log=ON long_query_time=0 -- Iniialize and start, setup replication/setup gtid bin/mysqld --initialize-insecure --basedir=/export/umesh/server/binaries/mysql-5.7.11 --datadir=/export/umesh/server/binaries/mysql-5.7.11/master -v bin/mysqld --initialize-insecure --basedir=/export/umesh/server/binaries/mysql-5.7.11 --datadir=/export/umesh/server/binaries/mysql-5.7.11/slave -v [umshastr@hod03]/export/umesh/server/binaries/mysql-5.7.11: bin/mysqld --defaults-file=./m.cnf & [1] 13434 [umshastr@hod03]/export/umesh/server/binaries/mysql-5.7.11: bin/mysqld --defaults-file=./s.cnf & [2] 13462 - Enable GTID based replication(stop master/slave - restart with gtid options -make sure slave has MTS enabled) [umshastr@hod03]/export/umesh/server/binaries/mysql-5.7.11: bin/mysqld --defaults-file=./m.cnf --gtid-mode=ON --enforce-gtid-consistency & [1] 14279 [umshastr@hod03]/export/umesh/server/binaries/mysql-5.7.11: bin/mysqld --defaults-file=./s.cnf --skip_slave_start --gtid-mode=ON --enforce-gtid-consistency & [2] 14312 -- Started provisioning data on master sysbench/sysbench --test=sysbench/tests/db/oltp.lua --oltp-tables-count=100 --oltp-table-size=5000 --mysql-table-engine=innodb --mysql-db=test --mysql-user=root --mysql-socket=/export/umesh/server/binaries/mysql-5.7.11/run/master.sock prepare sysbench/sysbench --test=sysbench/tests/db/oltp.lua --oltp-tables-count=100 --oltp-test-mode=complex --oltp-read-only=off --num-threads=50 --max-time=100 --max-requests=0 --mysql-db=test --mysql-user=root --mysql-socket=/export/umesh/server/binaries/mysql-5.7.11/run/master.sock run sysbench/sysbench --test=sysbench/tests/db/oltp.lua --oltp-tables-count=100 --oltp-table-size=5000 --mysql-table-engine=innodb --mysql-db=test1 --mysql-user=root --mysql-socket=/export/umesh/server/binaries/mysql-5.7.11/run/master.sock prepare sysbench/sysbench --test=sysbench/tests/db/oltp.lua --oltp-tables-count=100 --oltp-test-mode=complex --oltp-read-only=off --num-threads=50 --max-time=500 --max-requests=0 --mysql-db=test1 --mysql-user=root --mysql-socket=/export/umesh/server/binaries/mysql-5.7.11/run/master.sock run sysbench/sysbench --test=sysbench/tests/db/oltp.lua --oltp-tables-count=100 --oltp-table-size=5000 --mysql-table-engine=innodb --mysql-db=test2 --mysql-user=root --mysql-socket=/export/umesh/server/binaries/mysql-5.7.11/run/master.sock prepare sysbench/sysbench --test=sysbench/tests/db/oltp.lua --oltp-tables-count=100 --oltp-test-mode=complex --oltp-read-only=off --num-threads=50 --max-time=100 --max-requests=0 --mysql-db=test2 --mysql-user=root --mysql-socket=/export/umesh/server/binaries/mysql-5.7.11/run/master.sock run sysbench/sysbench --test=sysbench/tests/db/oltp.lua --oltp-tables-count=100 --oltp-table-size=5000 --mysql-table-engine=innodb --mysql-db=test3 --mysql-user=root --mysql-socket=/export/umesh/server/binaries/mysql-5.7.11/run/master.sock prepare sysbench/sysbench --test=sysbench/tests/db/oltp.lua --oltp-tables-count=100 --oltp-test-mode=complex --oltp-read-only=off --num-threads=50 --max-time=100 --max-requests=0 --mysql-db=test3 --mysql-user=root --mysql-socket=/export/umesh/server/binaries/mysql-5.7.11/run/master.sock run -- slave mysql> STOP SLAVE; Query OK, 0 rows affected (0.27 sec) mysql> SET GLOBAL SLAVE_PARALLEL_TYPE='LOGICAL_CLOCK'; Query OK, 0 rows affected (0.00 sec) mysql> SET GLOBAL SLAVE_PARALLEL_WORKERS=10; Query OK, 0 rows affected (0.00 sec) mysql> START SLAVE; Query OK, 0 rows affected (0.01 sec) mysql> select * from performance_schema.replication_applier_status_by_worker; +--------------+-----------+-----------+---------------+----------------------------------------------+-------------------+--------------------+----------------------+ | CHANNEL_NAME | WORKER_ID | THREAD_ID | SERVICE_STATE | LAST_SEEN_TRANSACTION | LAST_ERROR_NUMBER | LAST_ERROR_MESSAGE | LAST_ERROR_TIMESTAMP | +--------------+-----------+-----------+---------------+----------------------------------------------+-------------------+--------------------+----------------------+ | | 1 | 85 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358718 | 0 | | 0000-00-00 00:00:00 | | | 2 | 86 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358745 | 0 | | 0000-00-00 00:00:00 | | | 3 | 87 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358747 | 0 | | 0000-00-00 00:00:00 | | | 4 | 88 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358739 | 0 | | 0000-00-00 00:00:00 | | | 5 | 89 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358748 | 0 | | 0000-00-00 00:00:00 | | | 6 | 90 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358746 | 0 | | 0000-00-00 00:00:00 | | | 7 | 91 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358741 | 0 | | 0000-00-00 00:00:00 | | | 8 | 92 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358742 | 0 | | 0000-00-00 00:00:00 | | | 9 | 93 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358743 | 0 | | 0000-00-00 00:00:00 | | | 10 | 94 | ON | 245f1c0f-ec3c-11e5-b105-0010e05f3e06:6358744 | 0 | | 0000-00-00 00:00:00 | +--------------+-----------+-----------+---------------+----------------------------------------------+-------------------+--------------------+----------------------+ 10 rows in set (0.00 sec) mysql> select * from performance_schema.replication_applier_status_by_worker order by LAST_SEEN_TRANSACTION; Empty set (0.00 sec)