GreatSQL installation and replica seting

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

wget https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm
yum install -y mysql80-community-release-el7-7.noarch.rpm
yum install mysql-router-community-8.0.32-1.el7.x86_64 -y
yum install -y mysql-shell-8.0.32

A:mysqlsh
1:
 dba.configuratio

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值