在主从节点上都放开对端口3306的访问,或者直接关闭防火墙
。
临时关闭
service iptables stop
service iptables start
永久关闭
chkconfig iptables on
chkconfig iptables off
查看防火墙状态
service iptables status
1.3 root账号
mycat是我们的数据库中间件,那么mycat必然要能够访问对应的主从
数据库,所以在主从
数据库中我们需要分别创建访问的账号。
grant all privileges on . to ‘root’@’%’ identified by ‘123456’ with grant option;
flush privileges;
2.1 下载安装软件
官网地址:http://www.mycat.io/
2.2 上传解压安装
将下载的文件上传到/usr/local
目录下,并解压
2.3 目录介绍
解压后的目录结构如下:
| 目录 | 描述 |
| — | :-- |
| bin | 目录里是启动脚本 |
| conf | 目录里是配置文件 |
| catlet | 为 Mycat 的一个扩展功能 |