MySQL集群读写分离方案C-(MySQL+GTID+MyCat+Keepalive)之4/5:MyCat2分库分表
一、Mycat2安装
1、软件下载
cd /mysql/app/mycat
模版下载:https://download.topunix.com/MySQL/Software-Cluster/Software-Mycat/Mycat2/mycat2-install-template-1.20.zip lib下载:https://download.topunix.com/MySQL/Software-Cluster/Software-Mycat/Mycat2/assistant-1.22-release-jar-with-dependencies-2022-5-19.jar
2、软件安装
unzip /mysql/app/mycat2-install-template-1.20.zip -d /mysql/app/ cp assistant-1.22-release-jar-with-dependencies-2022-5-19.jar ./mycat/lib
3、软件文件配置修改
vi /mysql/app/mycat/conf/datasources/prototypeDs.datasource.json 修改可以连接的ip,端口,用户及密码。
4、启动mycat2
chmod +x /mysql/app/mycat/bin chmod +x lib/*
5、