InnoDB Cluster Notes
InnoDB Cluster Notes
# Open /etc/my.cnf and paste the following lines on the 3 instances(machine) and
change server id,bind-address,report_host,loose-group_replication_local_address for
the other 2 instances.
[mysqld]
plugin-load = group_replication.so
gtid_mode = ON
enforce_gtid_consistency = ON
master_info_repository = TABLE
relay_log_info_repository = TABLE
binlog_checksum = NONE
log_slave_updates = ON
log_bin = binlog
binlog_format = ROW
transaction_write_set_extraction = XXHASH64
loose-group_replication_bootstrap_group = OFF
loose-group_replication_start_on_boot = OFF
loose-group_replication_group_name = "959cf631-538c-415d-8164-ca00181be227"
loose-group_replication_ip_whitelist
="192.168.56.106,192.168.56.107,192.168.56.108"
loose-group_replication_group_seeds
="192.168.56.106:33061,192.168.56.107:33061,192.168.56.108:33061"
loose-group_replication_single_primary_mode = OFF
loose-group_replication_enforce_update_everywhere_checks = OFF
server_id = 1
bind-address = "192.168.56.106"
report_host = "192.168.56.106"
loose-group_replication_local_address = "192.168.56.106:33061"
flush privileges;
SELECT @@group_replication_group_name;
SELECT @@global.gtid_executed;
RESET MASTER;
SELECT @@global.gtid_executed;
Log on to mysqlsh
dba.checkInstanceConfiguration('innodb@centos01:3306')
shell.connect('innodb@centos01:3306')
cluster.status();
Log on to mysqlsh
dba.checkInstanceConfiguration('innodb@centos02:3306')
\connect innodb@centos01:3306
cluster = dba.getCluster()
cluster.addInstance('innodb@centos02:3306')
cluster.status();
Log on to mysqlsh
dba.checkInstanceConfiguration('innodb@centos03:3306')
\connect innodb@centos01:3306
cluster = dba.getCluster()
cluster.addInstance('innodb@centos03:3306')
cluster.status();
OPen a diffrent ssh for centos01 and log on to mysql
mysql -u root -p
SHOW PLUGINS;