mysqlrouter 安装

3如果的集群请每一台重复安装,本文介绍在第一台按章

1:下载包文件,Install, 一定在安装好mysql 安装mysqlrouter,本文安装用户是在mysql上建立了一个账号  mysql@172.31.26.31:9002  密码是:test01

cd/data
wget https://product.greatdb.com/GreatSQL-8.0.32-24/greatsql-mysql-router-8.0.32-24.1.el7.x86_64.rpm;
yum -y install greatsql-mysql-router-8.0.32-24.1.el7.x86_64.rpm;
history | grep mysqlrouter

2:安装mysqlrouter 本机器IP  172.31.26.31:9002

systemctl status mysqlrouter;systemctl restart mysqlrouter;
mysqlrouter --bootstrap mysql@172.31.26.31:9002 --user=mysqlrouter --directory=/data/mysqlrouter/ --conf-set-option=routing:bootstrap_ro.max_connections=2000 --conf-set-option=routing:bootstra_rw.max_connections=2000 --conf-set-option=routing:bootstrap_ro.routing_strategy=round-robin

 3:编辑文件 /data/mysqlrouter/mysqlrouter.conf

vim /data/mysqlrouter/mysqlrouter.conf
添加一行
 max_total_connections=5200

4:添加执行文件目录地址
ExecStart=/usr/bin/mysqlrouter -c /data/mysqlrouter/mysqlrouter.conf

5:重新启动mysqlrouter

systemctl stop mysqlrouter.service
systemctl  daemon-reload
systemctl restart mysqlrouter.service
systemctl status mysqlrouter.service

==================the configuration information====================

{

  "replicaSetName": "test88",
 "routers" {
   "zy-nph-skg-fat-dba-dbworker04::":{
       "hostname": "zy-nph-skg-fat-dba-dbworker04",
       "lastCheckIn": null,
       "roPort": "6447",
       "roXPort": "6449",
       "rwPort":  "6446",
       "rwXPort": "6448"
       "version": "8.0.32"
},
"zy-nph-skg-fat-dba-dbworker04::system":{
   "hostname": "zy-nph-skg-fat-dba-dbworker04",
       "lastCheckIn": null,
       "roPort": "6447",
       "roXPort": "6449",
       "rwPort":  "6446",
       "rwXPort": "6448"
       "version": "8.0.32"
}
}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值