| | 88 | |
| | 89 | ------------------------------------------------------------------------------------------ |
| | 90 | == Multiple hosts on Docker Container == |
| | 91 | |
| | 92 | At nodedb1 192.168.81.36 file start.sh |
| | 93 | {{{ |
| | 94 | node=1 |
| | 95 | #docker run -it --name=nodedb1 --net=group1 --hostname=nodedb1 -p 3306:3306 \ |
| | 96 | #docker run -d --name=nodedb$node --hostname=nodedb$node --network host -p 3306:3306 -p 33061:33061 \ |
| | 97 | docker run -d --name=nodedb$node --hostname=nodedb$node --net=host \ |
| | 98 | -v $PWD/mysql-8.0.11/d$node:/var/lib/mysql \ |
| | 99 | -e MYSQL_ROOT_PASSWORD=mypass mysql/mysql-server:8.0.11 \ |
| | 100 | --server-id=$node \ |
| | 101 | --bind-address="0.0.0.0" \ |
| | 102 | --report_host="192.168.81.36" \ |
| | 103 | --loose-group_replication_local_address="192.168.81.36:33061" \ |
| | 104 | --log-bin='mysql-bin-1.log' \ |
| | 105 | --enforce-gtid-consistency='ON' \ |
| | 106 | --log-slave-updates='ON' \ |
| | 107 | --gtid-mode='ON' \ |
| | 108 | --transaction-write-set-extraction='XXHASH64' \ |
| | 109 | --binlog-checksum='NONE' \ |
| | 110 | --master-info-repository='TABLE' \ |
| | 111 | --relay-log-info-repository='TABLE' \ |
| | 112 | --plugin-load='group_replication.so' \ |
| | 113 | --relay-log-recovery='ON' \ |
| | 114 | --group-replication-start-on-boot='OFF' \ |
| | 115 | --group-replication-group-name='aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' \ |
| | 116 | --group-replication-local-address="192.168.81.36:33061" \ |
| | 117 | --group-replication-group-seeds='192.168.81.36:33061,192.168.81.11:33061,192.168.81.10:33061' \ |
| | 118 | --loose-group-replication-single-primary-mode='OFF' \ |
| | 119 | --loose-group-replication-enforce-update-everywhere-checks='ON' |
| | 120 | }}} |