1: host ip
172.31.28.206(primary)
172.31.28.207(second node)
172.31.28.208(third node)
wget https://product.greatdb.com/GreatSQL-8.0.32-25-Linux-glibc2.17-x86_64.tar.xz
MYSQL INSTALL PROT
PORT:9999
2: EDIT system hosts(modify hosts for each node)
vi /etc/hosts
add below
172.31.28.206 hostname
172.31.28.207 hostanme
172.31.28.208 hostname
3:edit mysql config(modify my.cnf)
after any variable changed then need restart mysql service
vim /data/db/mysql999/my.cnf
dlete parameter
#character-set-client-handshake = FALSE
AND
qtid_mode = ON
check peport_host variable in my.cnf
report_host = primary host
## note: Each node must be to set report_host to itself ip address
4 install
A: cd /opt;
B: install GreatMysql complete the must
5: create user 'mgr_db'@'172.31.28.%' identified by '@password'; #note the percent is all the next number follow to .28 is can connect /example -172.31.28.1 server
GRANT all privileges on *.* to 'mgr_db'@'172.31.28.%' with grant option;
6: building mgr cluster using mysqlshell
mysqlsh --uri mgr_db@172.31.28.206:3306 #note use the localhost server to execute the command
7: you need to check all the instance of the 3 server if compantible to innodb cluster
js>>dba.configureInstance()
#AS you can sell below it say that the instance of primary node is read for innodb cluster
# check the other server using the primary node shell
js>>dba.checkInstanceConfiguration('mgr_db'@172.31.28.207:3306');
js>>dba.checkInstanceConfiguration('mgr_db'@172.31.28.208:3306');
8: create instance and add instance
# create instance
js>> var cluster = dba.createCluster('myMGR.cluster');
# ADD INSTANCE
js> Cluster.addInstance('mgr_db@172.31.28.207:3306')
js> Cluster.addInstance('mgr_db@172.31.28.208:3306')
# output
9: MYSQL router Bootstrapping
>> useradd mysqlrouter -s/sbin/nologin
>> mysqlrouter --bootstrap mgr_db@172.31.28.206:3306 --directory /etc/mysqlrouter --user=mysqlrouter --force
# create service of the mysqlrouter
>> vim /etc/systemd/system/mysqlrouter.service
[Unit]
Description=MySQL rOUTER
After=network.target
After=syslog.target
[Service]
Type=notify
User=mysqlrouter
Group=mysqlrouter
# Start main service
ExecStart=/data/db/mysqlrouter/bin/mysqlrouter -C /data/db/mysqlrouter/mysqlrouter.conf
#Sets open_files_limit
LimitNoFILE = 10000
>> systemctl daemon-reload
#TEST
mysql-u mgr_db -p -h(172.31.28.206):207,208 -P6446