feat(mysql_replication): add parallel workers
This commit is contained in:
parent
85e628f659
commit
9fe60d8a5d
1 changed files with 4 additions and 2 deletions
|
|
@ -104,6 +104,8 @@ max_binlog_size = 100M
|
||||||
gtid_mode = ON
|
gtid_mode = ON
|
||||||
enforce_gtid_consistency = ON
|
enforce_gtid_consistency = ON
|
||||||
log_slave_updates = 1
|
log_slave_updates = 1
|
||||||
|
slave_parallel_type = 'LOGICAL_CLOCK'
|
||||||
|
slave_parallel_workers = 2
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart mariadb: `systemctl restart mariadb`
|
Restart mariadb: `systemctl restart mariadb`
|
||||||
|
|
@ -142,8 +144,8 @@ mysql -u root -psupersecuresource -e "CREATE DATABASE IF NOT EXISTS databeast;"
|
||||||
mysqldump -u root -h source.example.com -psupersecuresource \
|
mysqldump -u root -h source.example.com -psupersecuresource \
|
||||||
--single-transaction \
|
--single-transaction \
|
||||||
--set-gtid-purged=ON \
|
--set-gtid-purged=ON \
|
||||||
--source-data=1 \
|
--quick \
|
||||||
--databases pms | mysql -u root -psupersecure
|
--databases databeast | mysql -u root -psupersecure
|
||||||
```
|
```
|
||||||
|
|
||||||
### Activate replication
|
### Activate replication
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue