部署mysqlinnodbcluster——mysql官方的一种集方式

发酵饲料
Creating a Session to 'root@db-node01:3000'
Classic Session successfully established. No default schema selected.
mysql-js> var cluster = ateCluster('testCluster');  # 创建⼀个 cluster,命名为 'testCluster' A new InnoDB cluster will be created on instance 'root@db-node01:3000'.
Creating InnoDB cluster 'testCluster' on 'root@db-node01:3000'...
Adding
Cluster successfully created. Use Cluster.addInstance() to add MySQL instances.
At least 3 instances are needed for the cluster to be able to withstand up to
one server failure.
如上的信息, 如果创建成功, 则会输出的信息中会有类似“Cluster successfully created.”的语句
#创建成功后,查看cluster状态
mysql-js> cluster.status();
{
"clusterName": "testCluster",
"defaultReplicaSet": {
"name": "default",
"primary": "db-node01:3000",
"status": "OK_NO_TOLERANCE",
"statusText": "Cluster is NOT tolerant to any failures.",
创新社会管理体制"topology": {
"db-node01:3000": {
"address": "db-node01:3000",
"mode": "R/W",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
}
}
}虚假记忆
}
mysql-js> cluster.addInstance('root@db-node02:3000');
A new instance will be added to the InnoD
B cluster. Depending on the amount of
data on the cluster this might take from a few seconds to several hours.
Please provide the password for 'root@db-node02:3000':
财智老板通Adding instance to the cluster ...
The instance 'root@db-node02:3000' was successfully added to the cluster.
mysql-js> cluster.addInstance('root@db-node03:3000');
A new instance will be added to the InnoD
B cluster. Depending on the amount of
data on the cluster this might take from a few seconds to several hours.
Please provide the password for 'root@db-node03:3000':
Adding instance to the cluster ...
The instance 'root@db-node03:3000' was successfully added to the cluster.
mysql-js> cluster.status();
{
"clusterName": "testCluster",
"defaultReplicaSet": {
"name": "default",
"primary": "db-node01:3000",
"status": "OK",
"statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
"topology": {
"db-node01:3000": {
"address": "db-node01:3000",海音寺潮五郎
"mode": "R/W",
"readReplicas": {},
"role": "HA",
"status": "ONLINE"
},
"db-node02:3000": {
cnf
"address": "db-node02:3000",
"mode": "R/O",
"readReplicas": {},

本文发布于:2024-09-20 20:20:53,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/718884.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:信息   查看   创建   管理体制   财智   海音
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议