InnoDB Cluster config

There is not a lot of information that is easy to understand to get innodb cluster running,

The following is the terminal dump of what I needed to do to get it working, important notes.

you must bind mysql to 0.0.0.0

prior to adding a server to the cluster execute RESET MASTER; to clear the logs.

apt install python -y
wget http://dev.mysql.com/get/mysql-apt-config_0.8.4-1_all.deb
dpkg -i ./mysql-apt-config_0.8.4-1_all.deb
apt-get update
apt-get install mysql-server mysql-shell -y

mysql_ssl_rsa_setup –uid mysql

mysqlsh

\connect root@localhost:3306

dba.configureLocalInstance();

1) Create remotely usable account for ‘root’ with same grants and password
2) Create a new admin account for InnoDB cluster with minimal required grants
3) Ignore and continue
4) Cancel

Please select an option [1]: 2
Please provide an account name (e.g: icroot@%) to have it created with the necessary
privileges or leave empty and press Enter to cancel.
Account Name: icroot@%

shell.connect(‘icroot@i1:3306’);
var cluster = dba.createCluster(‘cluster name’, { memberSslMode: ‘REQUIRED’, ipWhitelist:’192.168.0.0/16,127.0.0.1/8′});

cluster.addInstance(‘icroot@i2:3306’, { memberSslMode: ‘REQUIRED’, ipWhitelist:’192.168.0.0/16,127.0.0.1/8′});

GRANT ALL PRIVILEGES ON *.* TO ‘icroot’@’%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
flush privileges

Comments are closed.