mysql shell 安装
参考我写的另一篇文章: https://blog.csdn.net/eaglejiawo1120/article/details/84301142
测试环境
主机ip | mgr端口 | 是否可读写 |
192.168.1.103 | 3210(mysql启动端口),32100(mgr管理端口) | 写 |
192.168.1.104 | 3210(mysql启动端口),32100(mgr管理端口) | 读 |
192.168.1.104 | 3220(mysql启动端口),32200(mgr管理端口) | 读 |
mysqlshell 安装位置 | 192.168.1.103 |
proxysql 安装位置 | 192.168.1.103,192.168.1.104 |
注意:本测试中涉及到mysql用户登录密码的部分都为空(只是为了方便测试)。
cluster状态值含义
mysqlshell查看cluster的状态时,可以看到如下几种值:
-
ONLINE
: The instance is online and participating in the cluster. -
OFFLINE
: The instance has lost connection to the other instances. -
RECOVERING
: The instance is attempting to synchronize with the cluster by retrieving transactions it needs before it can become anONLINE
member. -
UNREACHABLE
: The instance has lost communication with the cluster. -
ERROR
: The instance has encountered an error during the recovery phase or while applying a transaction.
Important
Once an instance enters ERROR
state, the super_read_only
option is set to ON
. To leave the ERROR
state you must manually configure the instance with super_read_only=OFF
.
(MISSING)
: The state of an instance which is part of the configured cluster, but is currently unavailable.
Note
The MISSING
state is specific to InnoDB cluster, it is not a state generated by Group Replication. MySQL Shell uses this state to indicate instances that are registered in the metadata, but cannot be found in the live cluster view.
mgr 状态含义
Field |
Description |
Group Synchronized |
---|---|---|
ONLINE |
The member is ready to serve as a fully functional group member, meaning that the client can connect and start executing transactions. |
Yes |
RECOVERING |
The member is in the process of becoming an active member of the group and is currently going through the recovery process, receiving state information from a donor. |
No |
OFFLINE |
The plugin is loaded but the member does not belong to any group. |
No |
ERROR |
The state of the member. Whenever there is an error on the recovery phase or while applying changes, the server enters this state. |
No |
UNREACHABLE |
Whenever the local failure detector suspects that a given se |