失效链接处理 |
Mycat MySQL Galera读写分离验证安装手册 PDF 下载
本站整理下载:
相关截图:
![]()
主要内容:
添加 MySQL Galera 新节点
添加新节点的时候,新接入的节点叫 Joiner,给 Joiner 提供复制的节点叫 Donor.新的节点接入需要:
1) 安装带 wsrep patch 的 MySQL 版本
2) 安装 Galera 复制插件
3) 配置好新节点的 MySQL(参考 Donor 的 my.cnf)
4) 配置或启动的 gcomm://的地址是需要使用 donor 的 IP.
接入节点 galera2
mysqld_safe --wsrep_cluster_address="gcomm://192.168.1.250:4567,192.168.1.248:4567" >/dev/null &
接入节点 galera3
service mysqld start --wsrep_cluster_address="gcomm://192.168.1.250:4567,192.168.1.248:4567"
修改 galera 节点的 wsrep_cluster_address
service mysql restart --wsrep_cluster_address="gcomm://192.168.1.248:4567,192.168.1.249:4567"
同步验证
在其中一个节点上创建账号
mysql> create user 'mallcai'@ '192.168.1.%' identified by 'XXXXXX';
mysql> grant all privileges on *.* to 'mallcai'@ '192.168.1.%' with grant option;
mysql> flush privileges;
在其他节点查看账号同步情况
mysql> select user,host from mysql.user;
+---------+-------------+
| user | host | +---------+-------------+
| root | 127.0.0.1 |
| mallcai | 192.168.1.% |
| root | ::1 |
| | galera |
| root | galera |
| | localhost |
| root | localhost |
+---------+-------------+
7 rows in set (0.00 sec)
|