Checking Whether Parallel Replication Is Enabled
Check whether parallel replication of MySQL primary-secondary replication is enabled. The deployment mode of the primary database must be the same as that of secondary databases.
- Log in to the primary database.
1/usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysql.sock
Ensure that the primary database is in normal state.
show master status;
Ensure that the host information of two secondary databases exist on the primary database, and that the Host and Port values of the secondary databases are correct.
show slave hosts;
- Check whether parallel replication is enabled on the primary database.
Run the following commands to query the values of parallel replication parameters:
show variables like '%transaction_write_set_extraction%'; show variables like '%binlog_transaction_dependency_tracking%'; show variables like '%slave_parallel_type%'; show variables like '%slave_parallel_workers%';
If the value of slave_parallel_type is DATABASE, parallel replication is not enabled. If the value of slave_parallel_type is LOGICAL_CLOCK, parallel replication is enabled.
- Log in to a secondary database.
1/usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysql.sock
Ensure that the secondary database is in normal state.
show slave status\G;
- Check whether parallel replication is enabled on the secondary database.
Run the following commands to query the values of parallel replication parameters:
show variables like '%transaction_write_set_extraction%'; show variables like '%binlog_transaction_dependency_tracking%'; show variables like '%slave_parallel_type%'; show variables like '%slave_parallel_workers%';
If the value of slave_parallel_type is DATABASE, parallel replication is not enabled. If the value of slave_parallel_type is LOGICAL_CLOCK, parallel replication is enabled.